dont use what could be an invalid iterator
authorDana Jansens <danakj@orodu.net>
Mon, 26 Aug 2002 21:29:20 +0000 (21:29 +0000)
committerDana Jansens <danakj@orodu.net>
Mon, 26 Aug 2002 21:29:20 +0000 (21:29 +0000)
util/epist/screen.cc

index 416bb9b..f0fb79e 100644 (file)
@@ -546,8 +546,9 @@ void screen::updateActiveWindow() {
      * cycle stack.
      */
     if (_stacked_cycling && !_cycling) {
-      _clients.remove(*_active);
-      _clients.push_front(*_active);
+      XWindow *win = *_active;
+      _clients.remove(win);
+      _clients.push_front(win);
       _active = _clients.begin();
     }