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>
dev
Dima Ryazanov 11 years ago committed by Kristian Høgsberg
parent e5a3208373
commit b03b87fe63
  1. 2
      src/xwayland/window-manager.c

@ -695,11 +695,13 @@ weston_wm_window_activate(struct wl_listener *listener, void *data)
} }
if (wm->focus_window) { if (wm->focus_window) {
if (wm->focus_window->frame)
frame_unset_flag(wm->focus_window->frame, FRAME_FLAG_ACTIVE); frame_unset_flag(wm->focus_window->frame, FRAME_FLAG_ACTIVE);
weston_wm_window_schedule_repaint(wm->focus_window); weston_wm_window_schedule_repaint(wm->focus_window);
} }
wm->focus_window = window; wm->focus_window = window;
if (wm->focus_window) { if (wm->focus_window) {
if (wm->focus_window->frame)
frame_set_flag(wm->focus_window->frame, FRAME_FLAG_ACTIVE); frame_set_flag(wm->focus_window->frame, FRAME_FLAG_ACTIVE);
weston_wm_window_schedule_repaint(wm->focus_window); weston_wm_window_schedule_repaint(wm->focus_window);
} }

Loading…
Cancel
Save