]> Dogcows Code - chaz/openbox/commitdiff
fix segfault for placing windows without a group
authorDana Jansens <danakj@orodu.net>
Fri, 15 Oct 2010 18:43:56 +0000 (14:43 -0400)
committerDana Jansens <danakj@orodu.net>
Mon, 24 Jan 2011 19:19:23 +0000 (14:19 -0500)
openbox/place.c

index efcec7ed75fe9389d5fc254cd9330cbc5d8f7144..d56adfc89005e4627b54df5adf9947b594fc51b1 100644 (file)
@@ -159,16 +159,18 @@ static Rect *pick_head(ObClient *c, gboolean foreground)
     }
 
     /* find monitors with group members */
-    for (it = c->group->members; it; it = g_slist_next(it)) {
-        ObClient *itc = it->data;
-        if (itc != c) {
-            guint m = client_monitor(itc);
-
-            if (m < screen_num_monitors) {
-                if (screen_compare_desktops(itc->desktop, c->desktop))
-                    choice[m].flags |= HEAD_GROUP_DESK;
-                else
-                    choice[m].flags |= HEAD_GROUP;
+    if (c->group) {
+        for (it = c->group->members; it; it = g_slist_next(it)) {
+            ObClient *itc = it->data;
+            if (itc != c) {
+                guint m = client_monitor(itc);
+
+                if (m < screen_num_monitors) {
+                    if (screen_compare_desktops(itc->desktop, c->desktop))
+                        choice[m].flags |= HEAD_GROUP_DESK;
+                    else
+                        choice[m].flags |= HEAD_GROUP;
+                }
             }
         }
     }
This page took 0.023156 seconds and 4 git commands to generate.