diff options
Diffstat (limited to 'engines/sky/compact.cpp')
-rw-r--r-- | engines/sky/compact.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/engines/sky/compact.cpp b/engines/sky/compact.cpp index 9db5808fa1..c431e1b37f 100644 --- a/engines/sky/compact.cpp +++ b/engines/sky/compact.cpp @@ -272,8 +272,12 @@ Compact *SkyCompact::fetchCptInfo(uint16 cptId, uint16 *elems, uint16 *type, cha *elems = _cptSizes[cptId >> 12][cptId & 0xFFF]; if (type) *type = _cptTypes[cptId >> 12][cptId & 0xFFF]; - if (name) - strcpy(name, _cptNames[cptId >> 12][cptId & 0xFFF]); + if (name) { + if (_cptNames[cptId >> 12][cptId & 0xFFF] != NULL) + strcpy(name, _cptNames[cptId >> 12][cptId & 0xFFF]); + else + strcpy(name, "(null)"); + } return fetchCpt(cptId); } |