소스 검색

Merge pull request #699 from eightyeight/fix-gamelistmenuctrl-bitmap

Prevent call to dStrlen(NULL)
Daniel Buckmaster 11 년 전
부모
커밋
c7206f38f7
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      Engine/source/gui/controls/guiGameListMenuCtrl.cpp

+ 1 - 1
Engine/source/gui/controls/guiGameListMenuCtrl.cpp

@@ -736,7 +736,7 @@ bool GuiGameListMenuProfile::onAdd()
    // We can't call enforceConstraints() here because incRefCount initializes
    // We can't call enforceConstraints() here because incRefCount initializes
    // some of the things to enforce. Do a basic sanity check here instead.
    // some of the things to enforce. Do a basic sanity check here instead.
    
    
-   if( !dStrlen(mBitmapName) )
+   if( !mBitmapName || !dStrlen(mBitmapName) )
    {
    {
       Con::errorf( "GuiGameListMenuProfile: %s can't be created without a bitmap. Please add a 'Bitmap' property to the object definition.", getName() );
       Con::errorf( "GuiGameListMenuProfile: %s can't be created without a bitmap. Please add a 'Bitmap' property to the object definition.", getName() );
       return false;
       return false;