projects
/
oweals
/
minetest.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
769a86b
)
Fixed (maybe) segfault if font is not found
author
Perttu Ahola
<celeron55@gmail.com>
Sat, 8 Jan 2011 16:57:21 +0000
(18:57 +0200)
committer
Perttu Ahola
<celeron55@gmail.com>
Sat, 8 Jan 2011 16:57:21 +0000
(18:57 +0200)
src/main.cpp
patch
|
blob
|
history
diff --git
a/src/main.cpp
b/src/main.cpp
index a0da103c94aa06974495ea867aa1b80f99b188bb..e6445f4a3bd7c4e0ef52ea121e7dda483e7261b1 100644
(file)
--- 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());
\r
if(font)
\r
skin->setFont(font);
\r
+ // If font was not found, this will get us one
\r
+ font = skin->getFont();
\r
\r
u32 text_height = font->getDimension(L"Hello, world!").Height;
\r
dstream<<"text_height="<<text_height<<std::endl;
\r