]> Dogcows Code - chaz/openbox/blobdiff - openbox/place.c
it would seem this cannot return NULL now
[chaz/openbox] / openbox / place.c
index efcec7ed75fe9389d5fc254cd9330cbc5d8f7144..a13bc2cbdbff41cdc7e3fe27994ad4ea4656e56a 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;
+                }
             }
         }
     }
@@ -449,9 +451,10 @@ static gboolean place_per_app_setting(ObClient *client, gint *x, gint *y,
     ob_debug("placing by per-app settings");
 
     /* Find which head the pointer is on */
-    if (settings->monitor == 0)
-        /* this can return NULL */
+    if (settings->monitor == 0) {
         screen = pick_pointer_head(client);
+        g_assert(screen);
+    }
     else {
         guint m = settings->monitor;
         if (m < 1 || m > screen_num_monitors)
This page took 0.022149 seconds and 4 git commands to generate.