}
/* 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;
+ }
}
}
}
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)