desktop-shell: handle NULL output in center_on_output()
authorPekka Paalanen <pekka.paalanen@collabora.co.uk>
Wed, 2 May 2018 08:21:56 +0000 (10:21 +0200)
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>
Thu, 24 May 2018 14:20:04 +0000 (17:20 +0300)
commit30aa59759ae9a3629c5f4e6a1d9532c41620328b
tree20f5e4aa2c421140956547148c32c9646d3555b1
parent99372bab4ce6555526edbf2c8ac114ac3c8acdfb
desktop-shell: handle NULL output in center_on_output()

This is a tentative crash fix for a case where there are no enabled
weston_outputs at all.

If no output is given, just put the surface at 0,0. At least it should
become mostly visible if an output is plugged in, if not centered.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.com>
Reviewed-by: Ian Ray <ian.ray@ge.com>
desktop-shell/shell.c