mirror of
https://cagebreak.project-repo.co/cagebreak.git
synced 2026-08-24 06:24:19 +02:00
Fix null pointer dereference warning
This commit is contained in:
parent
19e1407983
commit
af6adcc973
1 changed files with 2 additions and 5 deletions
7
view.c
7
view.c
|
|
@ -223,17 +223,15 @@ view_for_each_popup(struct cg_view *view, wlr_surface_iterator_func_t iterator,
|
|||
view->impl->for_each_popup(view, iterator, data);
|
||||
}
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wanalyzer-null-dereference"
|
||||
void
|
||||
view_unmap(struct cg_view *view) {
|
||||
#if CG_HAS_XWAYLAND
|
||||
if((view->type != CG_XWAYLAND_VIEW || xwayland_view_should_manage(view)))
|
||||
#endif
|
||||
{
|
||||
if(view_is_visible(view)) {
|
||||
struct cg_tile *view_tile = view_get_tile(view);
|
||||
if(view_tile != NULL) {
|
||||
struct cg_view *prev = view_get_prev_view(view);
|
||||
struct cg_tile *view_tile = view_get_tile(view);
|
||||
wlr_output_damage_add_box(view_tile->workspace->output->damage,
|
||||
&view_tile->tile);
|
||||
if((view->workspace->server->seat->seat->keyboard_state
|
||||
|
|
@ -265,7 +263,6 @@ view_unmap(struct cg_view *view) {
|
|||
}
|
||||
}
|
||||
#endif
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
wl_list_remove(&view->link);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue