mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-01-06 13:10:34 +01:00
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>
This commit is contained in:
parent
e5a3208373
commit
b03b87fe63
1 changed files with 4 additions and 2 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue