aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra/screen_eob.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/kyra/screen_eob.cpp')
-rw-r--r--engines/kyra/screen_eob.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/engines/kyra/screen_eob.cpp b/engines/kyra/screen_eob.cpp
index f6b0eafcf4..d3c2187177 100644
--- a/engines/kyra/screen_eob.cpp
+++ b/engines/kyra/screen_eob.cpp
@@ -91,8 +91,9 @@ const ScreenDim *Screen_Eob::getScreenDim(int dim) {
}
void Screen_Eob::modifyScreenDim(int dim, int x, int y, int w, int h) {
- delete _customDimTable[dim];
- _customDimTable[dim] = new ScreenDim;
+ if (!_customDimTable[dim])
+ _customDimTable[dim] = new ScreenDim;
+
memcpy(_customDimTable[dim], &_screenDimTable[dim], sizeof(ScreenDim));
_customDimTable[dim]->sx = x;
_customDimTable[dim]->sy = y;