summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanny Baumann <dannybaumann@web.de>2008-02-12 12:45:39 +0100
committerDanny Baumann <dannybaumann@web.de>2008-02-12 12:45:39 +0100
commit68789a5504f8f0e860355eb7cf83bdd7df94e7d4 (patch)
tree2f26a3766be2fa091eaeaaf5176f1601b73a3558
parenta1d9b5534f23fc72515f1de84745c704cce1b6b0 (diff)
downloadshelf-68789a5504f8f0e860355eb7cf83bdd7df94e7d4.tar.gz
shelf-68789a5504f8f0e860355eb7cf83bdd7df94e7d4.tar.bz2
Abort search if we found the window to remove.
Hopefully should fix rare crash.
-rw-r--r--shelf.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/shelf.c b/shelf.c
index e450f1a..e2059aa 100644
--- a/shelf.c
+++ b/shelf.c
@@ -285,7 +285,10 @@ shelfRemoveWindowFromList (ShelfedWindowInfo *info)
for (run = ss->shelfedWindows; run->next; run = run->next)
{
if (run->next == info)
+ {
run->next = info->next;
+ break;
+ }
}
}
}