Jelajahi Sumber

When setting the field on a GuiInspectorField, check if the field is null before setting the docs.

Cameron Porter 11 tahun lalu
induk
melakukan
91c058ca8a
1 mengubah file dengan 4 tambahan dan 3 penghapusan
  1. 4 3
      Engine/source/gui/editor/inspector/field.cpp

+ 4 - 3
Engine/source/gui/editor/inspector/field.cpp

@@ -58,7 +58,7 @@ GuiInspectorField::GuiInspectorField( GuiInspector* inspector,
    setCanSave( false );
    setBounds(0,0,100,18);
    
-   if( field )
+   if( field != NULL )
       _setFieldDocs( field->pFieldDocs );
 }
 
@@ -378,8 +378,9 @@ void GuiInspectorField::setInspectorField( AbstractClassRep::Field *field, Strin
       mCaption = getFieldName(); 
    else
       mCaption = caption;
-      
-   _setFieldDocs( mField->pFieldDocs );
+
+   if ( mField != NULL )
+      _setFieldDocs( mField->pFieldDocs );
 }
 
 //-----------------------------------------------------------------------------