forked from Mirrorlandia_minetest/minetest
Fixed (maybe) segfault if font is not found
This commit is contained in:
parent
769a86be19
commit
c3159160fa
@ -1440,6 +1440,8 @@ int main(int argc, char *argv[])
|
||||
gui::IGUIFont* font = guienv->getFont(porting::getDataPath("fontlucida.png").c_str());
|
||||
if(font)
|
||||
skin->setFont(font);
|
||||
// If font was not found, this will get us one
|
||||
font = skin->getFont();
|
||||
|
||||
u32 text_height = font->getDimension(L"Hello, world!").Height;
|
||||
dstream<<"text_height="<<text_height<<std::endl;
|
||||
|
Loading…
Reference in New Issue
Block a user