aboutsummaryrefslogtreecommitdiff
path: root/engines/glk/glulxe/glkop.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/glk/glulxe/glkop.cpp')
-rw-r--r--engines/glk/glulxe/glkop.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/engines/glk/glulxe/glkop.cpp b/engines/glk/glulxe/glkop.cpp
index 68e60c7bec..635d90bb7b 100644
--- a/engines/glk/glulxe/glkop.cpp
+++ b/engines/glk/glulxe/glkop.cpp
@@ -1165,6 +1165,10 @@ void Glulxe::glulxe_retained_unregister(void *array, uint len, const char *type
uint ix, addr2, val;
uint elemsize = 0;
+ // TODO: See if original GLULXE has code I'm overlooking to cleanly close everything before freeing memmap
+ if (!memmap)
+ return;
+
if (typecode[4] == 'C')
elemsize = 1;
else if (typecode[4] == 'I')