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:
fd70f4f
)
Grab GUIChatConsole::m_font, fixes segfault when changing font_size
author
Kahrl
<kahrl@gmx.net>
Tue, 17 Feb 2015 09:29:44 +0000
(10:29 +0100)
committer
Craig Robbins
<kde.psych@gmail.com>
Tue, 17 Feb 2015 14:38:57 +0000
(
00:38
+1000)
src/guiChatConsole.cpp
patch
|
blob
|
history
diff --git
a/src/guiChatConsole.cpp
b/src/guiChatConsole.cpp
index bdce7c872f94cb18fab9883982af6e0276cdf054..8210e0bf42bc0ded0cce7e395e4d4e1cd910ef42 100644
(file)
--- a/
src/guiChatConsole.cpp
+++ b/
src/guiChatConsole.cpp
@@
-99,7
+99,7
@@
GUIChatConsole::GUIChatConsole(
{
core::dimension2d<u32> dim = m_font->getDimension(L"M");
m_fontsize = v2u32(dim.Width, dim.Height);
-
dstream << "Font size: " << m_fontsize.X << " " << m_fontsize.Y << std::endl
;
+
m_font->grab()
;
}
m_fontsize.X = MYMAX(m_fontsize.X, 1);
m_fontsize.Y = MYMAX(m_fontsize.Y, 1);
@@
-109,7
+109,10
@@
GUIChatConsole::GUIChatConsole(
}
GUIChatConsole::~GUIChatConsole()
-{}
+{
+ if (m_font)
+ m_font->drop();
+}
void GUIChatConsole::openConsole(f32 height)
{