فهرست منبع

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();
    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;
       return mMinTabWidth;
 
 
    GFont *font = mProfile->mFont;
    GFont *font = mProfile->mFont;