[gnome-flashback] monitor-normal: only assign suggested positions to valid pointers



commit 3cf704c719b2bca258f4cbf86317c2b1e9e1960d
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Mon Sep 13 15:12:23 2021 +0300

    monitor-normal: only assign suggested positions to valid pointers
    
    Based on mutter commit:
    https://gitlab.gnome.org/GNOME/mutter/-/commit/32d7c5fbfb57

 backends/gf-monitor-normal.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/backends/gf-monitor-normal.c b/backends/gf-monitor-normal.c
index 1256e44..12fdaa0 100644
--- a/backends/gf-monitor-normal.c
+++ b/backends/gf-monitor-normal.c
@@ -157,8 +157,11 @@ gf_monitor_normal_get_suggested_position (GfMonitor *monitor,
   if (output_info->suggested_x < 0 && output_info->suggested_y < 0)
     return FALSE;
 
-  *x = output_info->suggested_x;
-  *y = output_info->suggested_y;
+  if (x != NULL)
+    *x = output_info->suggested_x;
+
+  if (y != NULL)
+    *y = output_info->suggested_y;
 
   return TRUE;
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]