From: Marius Vlad Date: Fri, 27 Mar 2020 22:23:14 +0000 (+0200) Subject: desktop-shell: Avoid retrieving output's width/height if none present X-Git-Tag: upstream/9.0.0~40 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6ebda36a3f024207260e0ddcb772a58d84b77ee1;p=platform%2Fupstream%2Fweston.git desktop-shell: Avoid retrieving output's width/height if none present As in some circumstances there could be no output connected, avoid retrieving the width/height of the output if none was found/connected. Fixes: #384 Signed-off-by: Marius Vlad --- diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c index 442a625f..ef0696ed 100644 --- a/desktop-shell/shell.c +++ b/desktop-shell/shell.c @@ -2697,8 +2697,10 @@ set_fullscreen(struct shell_surface *shsurf, bool fullscreen, shell_surface_set_output(shsurf, output); shsurf->fullscreen_output = shsurf->output; - width = shsurf->output->width; - height = shsurf->output->height; + if (shsurf->output) { + width = shsurf->output->width; + height = shsurf->output->height; + } } else if (weston_desktop_surface_get_maximized(desktop_surface)) { get_maximized_size(shsurf, &width, &height); }