From: Perttu Ahola Date: Sat, 8 Jan 2011 16:57:21 +0000 (+0200) Subject: Fixed (maybe) segfault if font is not found X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=c3159160fa3f3091f06b32bc41a57bc2969903eb;p=zefram%2Fminetest%2Fminetest_engine.git Fixed (maybe) segfault if font is not found --- diff --git a/src/main.cpp b/src/main.cpp index a0da103c..e6445f4a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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="<