DIRECTOR: Added sanity checks to func_cursor()

This commit is contained in:
Eugene Sandulenko
2020-02-26 20:35:02 +01:00
parent 1dc515a9bf
commit 92d207ba0f
+9
View File
@@ -345,6 +345,15 @@ void Lingo::func_cursor(int c, int m) {
return;
}
if (score->_loadedCast->getVal(c)->_surface == nullptr) {
warning("cursor: empty sprite %d surface", c);
return;
}
if (score->_loadedCast->getVal(m)->_surface == nullptr) {
warning("cursor: empty sprite %d surface", m);
return;
}
byte *assembly = (byte *)malloc(16 * 16);
byte *dst = assembly;