Skip to content

Commit

Permalink
Merge pull request #337 from greenfire27/WriteDefaultsFix
Browse files Browse the repository at this point in the history
Write Defaults Fix
  • Loading branch information
greenfire27 committed Apr 2, 2016
2 parents 66a5b6c + 273e2c7 commit c47a198
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions engine/source/sim/simObject.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit c47a198

Please sign in to comment.