Skip to content
Snippets Groups Projects
Commit ff32ef77 authored by Richard Linden's avatar Richard Linden
Browse files

fix for crash on startup (font system not initialized when first creating fonts)

parent acd047b6
Branches
Tags
No related merge requests found
...@@ -54,9 +54,12 @@ FT_Library gFTLibrary = NULL; ...@@ -54,9 +54,12 @@ FT_Library gFTLibrary = NULL;
//static //static
void LLFontManager::initClass() void LLFontManager::initClass()
{
if (!gFontManagerp)
{ {
gFontManagerp = new LLFontManager; gFontManagerp = new LLFontManager;
} }
}
//static //static
void LLFontManager::cleanupClass() void LLFontManager::cleanupClass()
......
...@@ -4745,6 +4745,9 @@ void LLViewerWindow::initFonts(F32 zoom_factor) ...@@ -4745,6 +4745,9 @@ void LLViewerWindow::initFonts(F32 zoom_factor)
{ {
LLFontGL::destroyAllGL(); LLFontGL::destroyAllGL();
// Initialize with possibly different zoom factor // Initialize with possibly different zoom factor
LLFontManager::initClass();
LLFontGL::initClass( gSavedSettings.getF32("FontScreenDPI"), LLFontGL::initClass( gSavedSettings.getF32("FontScreenDPI"),
mDisplayScale.mV[VX] * zoom_factor, mDisplayScale.mV[VX] * zoom_factor,
mDisplayScale.mV[VY] * zoom_factor, mDisplayScale.mV[VY] * zoom_factor,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment