From a9c57b63195cb5bc6b67751741e9d37bcbd6f3ff Mon Sep 17 00:00:00 2001 From: akallabeth Date: Sat, 25 Nov 2023 21:02:09 +0100 Subject: [PATCH] [client,x11] fix settings access warning --- client/X11/xf_monitor.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/client/X11/xf_monitor.c b/client/X11/xf_monitor.c index c7a9661a8..69355f8a1 100644 --- a/client/X11/xf_monitor.c +++ b/client/X11/xf_monitor.c @@ -385,10 +385,11 @@ BOOL xf_detect_monitors(xfContext* xfc, UINT32* pMaxWidth, UINT32* pMaxHeight) { UINT32 nr = 0; - UINT32* ids = freerdp_settings_get_pointer_array_writable(settings, FreeRDP_MonitorIds, 0); - if (ids) - nr = *ids; - + { + const UINT32* ids = freerdp_settings_get_pointer(settings, FreeRDP_MonitorIds); + if (ids) + nr = *ids; + } for (UINT32 i = 0; i < vscreen->nmonitors; i++) { MONITOR_ATTRIBUTES* attrs;