summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDima Ryazanov <dima@gmail.com>2013-11-15 02:01:19 -0800
committerKristian Høgsberg <krh@bitplanet.net>2013-12-03 16:12:54 -0800
commitb03b87fe63ede8d79cd31233ca7e023058d0ceae (patch)
tree276bde9ba72c412c8995935372c0f5814567186c
parente5a320837319ed91868b9e4311150527847db9f4 (diff)
Check for frame being NULL before setting/unsetting flags
Fixes a crash in Firefox when clicking an "install plugin" popup. Signed-off-by: Dima Ryazanov <dima@gmail.com>
-rw-r--r--src/xwayland/window-manager.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/xwayland/window-manager.c b/src/xwayland/window-manager.c
index 5ee94800..6d290266 100644
--- a/src/xwayland/window-manager.c
+++ b/src/xwayland/window-manager.c
@@ -695,12 +695,14 @@ weston_wm_window_activate(struct wl_listener *listener, void *data)
}
if (wm->focus_window) {
- frame_unset_flag(wm->focus_window->frame, FRAME_FLAG_ACTIVE);
+ if (wm->focus_window->frame)
+ frame_unset_flag(wm->focus_window->frame, FRAME_FLAG_ACTIVE);
weston_wm_window_schedule_repaint(wm->focus_window);
}
wm->focus_window = window;
if (wm->focus_window) {
- frame_set_flag(wm->focus_window->frame, FRAME_FLAG_ACTIVE);
+ if (wm->focus_window->frame)
+ frame_set_flag(wm->focus_window->frame, FRAME_FLAG_ACTIVE);
weston_wm_window_schedule_repaint(wm->focus_window);
}
}