mirror of
https://github.com/labwc/labwc.git
synced 2026-02-24 01:40:15 -05:00
view: add defensive checks for null content_tree
This commit is contained in:
parent
b1e7282995
commit
8bd20f19dc
4 changed files with 14 additions and 3 deletions
|
|
@ -74,6 +74,13 @@ render_node(struct server *server, struct wlr_render_pass *pass,
|
|||
static struct wlr_buffer *
|
||||
render_thumb(struct output *output, struct view *view)
|
||||
{
|
||||
if (!view->content_tree) {
|
||||
/*
|
||||
* Defensive. Could possibly occur if view was unmapped
|
||||
* with OSD already displayed.
|
||||
*/
|
||||
return NULL;
|
||||
}
|
||||
struct server *server = output->server;
|
||||
struct wlr_buffer *buffer = wlr_allocator_create_buffer(server->allocator,
|
||||
view->current.width, view->current.height,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue