Browse Source

Merge pull request #337 from greenfire27/WriteDefaultsFix

Write Defaults Fix
Peter Robinson 9 years ago
parent
commit
c47a1983e9
1 changed files with 1 additions and 4 deletions
  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.
     // Fetch field value.
     const char* pFieldValue = getDataField( fieldName, array );
     const char* pFieldValue = getDataField( fieldName, array );
 
 
-    // Sanity.
-    AssertFatal( pFieldValue != NULL, "Field value cannot be NULL." );
-
     // Return without the prefix if there's no value.
     // Return without the prefix if there's no value.
-    if ( *pFieldValue == 0 )
+    if ( pFieldValue == NULL || *pFieldValue == 0 )
         return StringTable->EmptyString;
         return StringTable->EmptyString;
 
 
     // Fetch the field prefix.
     // Fetch the field prefix.