monitor: Only assign suggested positions to valid pointers

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/522>
This commit is contained in:
Marco Trevisan (Treviño) 2019-03-27 05:08:39 +01:00 committed by Marge Bot
parent ab48b6b933
commit 32d7c5fbfb

View File

@ -730,7 +730,10 @@ meta_monitor_normal_get_suggested_position (MetaMonitor *monitor,
if (output_info->suggested_x < 0 && output_info->suggested_y < 0)
return FALSE;
if (x)
*x = output_info->suggested_x;
if (y)
*y = output_info->suggested_y;
return TRUE;