浏览代码

Fixed null profile crash

If the profile was null it would crash.
Nathan Bowhay 10 年之前
父节点
当前提交
789cc47b67
共有 1 个文件被更改,包括 1 次插入1 次删除
  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;