Explorar o código

Fixed null profile crash

If the profile was null it would crash.
Nathan Bowhay %!s(int64=10) %!d(string=hai) anos
pai
achega
789cc47b67
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      Engine/source/gui/containers/guiTabBookCtrl.cpp

+ 1 - 1
Engine/source/gui/containers/guiTabBookCtrl.cpp

@@ -622,7 +622,7 @@ S32 GuiTabBookCtrl::calculatePageTabWidth( GuiTabPageCtrl *page )
 
    const char* text = page->getText();
 
-   if( !text || dStrlen(text) == 0 || mProfile->mFont == NULL )
+   if( !text || dStrlen(text) == 0 || mProfile == NULL || mProfile->mFont == NULL )
       return mMinTabWidth;
 
    GFont *font = mProfile->mFont;