diff options
| author | Dana Jansens <danakj@orodu.net> | 2010-10-15 14:43:56 -0400 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2011-01-24 14:19:23 -0500 |
| commit | 5e38690d65459262e028cdbcddf8a1417287f156 (patch) | |
| tree | 3d1c9ddf223b48e14267db67b92a8100e848f971 | |
| parent | a8dbf2e74ea967158db754e383a88c84c331f97c (diff) | |
fix segfault for placing windows without a group
| -rw-r--r-- | openbox/place.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/openbox/place.c b/openbox/place.c index efcec7ed..d56adfc8 100644 --- a/openbox/place.c +++ b/openbox/place.c @@ -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; + } } } } |
