SCI: Don't iterate past end of list

svn-id: r44804
This commit is contained in:
Willem Jan Palenstijn 2009-10-08 21:32:04 +00:00
parent 76996301d1
commit 2f1c7f779a

View file

@ -91,8 +91,11 @@ void SciGuiWindowMgr::EndUpdate(GuiWindow *wnd) {
GuiPort *oldPort = _gfx->SetPort(_wmgrPort);
const PortList::iterator end = _windowList.end();
PortList::iterator it = Common::find(_windowList.begin(), end, wnd);
while (it != end) {
++it;
// wnd has to be in _windowList
assert(it != end);
while (++it != end) {
// FIXME: We also store GuiPort objects in the window list.
// We should add a check that we really only pass windows here...
UpdateWindow((GuiWindow *)*it);