Skip to content
Browse files

it would seem this cannot return NULL now

It will get the primary monitor if there is not monitor under the pointer. But
assert so it's clear something went wrong if this does happen. Note that there
was previously no check for the return value even though the comment claimed
there should be.
  • Loading branch information...
1 parent b1039d6 commit 332280daf9a4bc410544ae7d267092a11ab8c945 @danakj danakj committed Oct 14, 2011
Showing with 3 additions and 2 deletions.
  1. +3 −2 openbox/place.c
View
5 openbox/place.c
@@ -451,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)

0 comments on commit 332280d

Please sign in to comment.
Something went wrong with that request. Please try again.