aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine/gc.cpp
diff options
context:
space:
mode:
authorWillem Jan Palenstijn2011-02-28 20:32:46 +0100
committerWillem Jan Palenstijn2011-02-28 21:37:12 +0100
commitdb536da8d3838bc69cd2c18f49d62e9151d425a5 (patch)
tree4b6e413413084426de15e8ffaad0219837c44685 /engines/sci/engine/gc.cpp
parentce288024b495032d15940dc4b93069a3bc845f48 (diff)
downloadscummvm-rg350-db536da8d3838bc69cd2c18f49d62e9151d425a5.tar.gz
scummvm-rg350-db536da8d3838bc69cd2c18f49d62e9151d425a5.tar.bz2
scummvm-rg350-db536da8d3838bc69cd2c18f49d62e9151d425a5.zip
SCI: Skip Ports when iterating over Windows in GC
Diffstat (limited to 'engines/sci/engine/gc.cpp')
-rw-r--r--engines/sci/engine/gc.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/engines/sci/engine/gc.cpp b/engines/sci/engine/gc.cpp
index e080ad6e4b..15be17fd32 100644
--- a/engines/sci/engine/gc.cpp
+++ b/engines/sci/engine/gc.cpp
@@ -89,11 +89,11 @@ static void processEngineHunkList(WorklistManager &wm) {
PortList windowList = g_sci->_gfxPorts->_windowList;
for (PortList::const_iterator it = windowList.begin(); it != windowList.end(); ++it) {
- // FIXME: We also store Port objects in the window list.
- // We should add a check that we really only pass windows here...
- Window *wnd = ((Window *)*it);
- wm.push(wnd->hSaved1);
- wm.push(wnd->hSaved2);
+ if ((*it)->isWindow()) {
+ Window *wnd = ((Window *)*it);
+ wm.push(wnd->hSaved1);
+ wm.push(wnd->hSaved2);
+ }
}
}