[quartz] Fix use-before-init.

Thanks to Lukas Oberhuber for the patch.

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/4726
This commit is contained in:
John Ralls 2022-02-28 10:05:47 -08:00
parent c94837759e
commit 07d847d174

View File

@ -33,7 +33,7 @@ gdk_quartz_monitor_get_workarea (GdkMonitor *monitor,
GDK_QUARTZ_ALLOC_POOL;
NSArray *array = [NSScreen screens];
NSScreen* screen;
NSScreen* screen = NULL;
for (id obj in array)
{
CGDirectDisplayID screen_id =