Browse Source

Fixed null profile crash

If the profile was null it would crash.
Nathan Bowhay 10 years ago
parent
commit
789cc47b67
1 changed files with 1 additions and 1 deletions
  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;