popup constraint handle empty output layout

This commit is contained in:
Tony Crisci 2018-03-28 18:36:48 -04:00
parent bd828e23de
commit 67c8aec77f
1 changed files with 4 additions and 2 deletions

View File

@ -76,8 +76,10 @@ static void popup_unconstrain(struct roots_xdg_popup_v6 *popup) {
struct wlr_output *output =
wlr_output_layout_output_at(layout, dest_x, dest_y);
// XXX: handle empty output layout
assert(output);
if (output == NULL) {
return;
}
int width = 0, height = 0;
wlr_output_effective_resolution(output, &width, &height);