Prechádzať zdrojové kódy

Write Defaults Fix

This corrects a long standing error that causes the game to crash when
writing the defaults in taml.
Peter Robinson 9 rokov pred
rodič
commit
273e2c79b1
1 zmenil súbory, kde vykonal 1 pridanie a 4 odobranie
  1. 1 4
      engine/source/sim/simObject.cc

+ 1 - 4
engine/source/sim/simObject.cc

@@ -622,11 +622,8 @@ const char *SimObject::getPrefixedDataField(StringTableEntry fieldName, const ch
     // Fetch field value.
     const char* pFieldValue = getDataField( fieldName, array );
 
-    // Sanity.
-    AssertFatal( pFieldValue != NULL, "Field value cannot be NULL." );
-
     // Return without the prefix if there's no value.
-    if ( *pFieldValue == 0 )
+    if ( pFieldValue == NULL || *pFieldValue == 0 )
         return StringTable->EmptyString;
 
     // Fetch the field prefix.