Added missing check for monitor indices
authorArmin Novak <armin.novak@thincast.com>
Wed, 23 Oct 2019 13:03:39 +0000 (15:03 +0200)
committerArmin Novak <armin.novak@thincast.com>
Wed, 23 Oct 2019 13:03:39 +0000 (15:03 +0200)
client/X11/xf_monitor.c

index 372e4ee..4dc16d5 100644 (file)
@@ -281,7 +281,7 @@ BOOL xf_detect_monitors(xfContext* xfc, UINT32* pMaxWidth, UINT32* pMaxHeight)
                   this is required in case of a screen composed of more than one monitor
                   but user did not enable multimonitor
                */
-               if (settings->NumMonitorIds == 1)
+               if ((settings->NumMonitorIds == 1) && (vscreen->nmonitors > current_monitor))
                {
                        monitor = vscreen->monitors + current_monitor;