mirror of
https://github.com/cage-kiosk/cage.git
synced 2026-02-21 01:40:59 -05:00
Fix segfault when title or app_id is NULL
This commit is contained in:
parent
ea2069f427
commit
dafb28626f
2 changed files with 12 additions and 5 deletions
|
|
@ -225,8 +225,12 @@ handle_xdg_toplevel_map(struct wl_listener *listener, void *data)
|
|||
|
||||
view_map(view, xdg_shell_view->xdg_toplevel->base->surface);
|
||||
|
||||
wlr_foreign_toplevel_handle_v1_set_title(view->foreign_toplevel_handle, xdg_shell_view->xdg_toplevel->title);
|
||||
wlr_foreign_toplevel_handle_v1_set_app_id(view->foreign_toplevel_handle, xdg_shell_view->xdg_toplevel->app_id);
|
||||
if (xdg_shell_view->xdg_toplevel->title)
|
||||
wlr_foreign_toplevel_handle_v1_set_title(view->foreign_toplevel_handle,
|
||||
xdg_shell_view->xdg_toplevel->title);
|
||||
if (xdg_shell_view->xdg_toplevel->app_id)
|
||||
wlr_foreign_toplevel_handle_v1_set_app_id(view->foreign_toplevel_handle,
|
||||
xdg_shell_view->xdg_toplevel->app_id);
|
||||
/* Activation state will be set by seat_set_focus */
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue