Skip to content

Instantly share code, notes, and snippets.

@kahrl
Created February 10, 2015 09:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kahrl/24d5c037e1688b860918 to your computer and use it in GitHub Desktop.
Save kahrl/24d5c037e1688b860918 to your computer and use it in GitHub Desktop.
diff --git a/src/guiChatConsole.cpp b/src/guiChatConsole.cpp
index bdce7c8..8210e0b 100644
--- 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)
{
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment