[mutter] onscreen/native: Add missing error messages



commit d6abea3ba78fefbceb216ddf288909d112f3884f
Author: Dor Askayo <dor askayo gmail com>
Date:   Sun Feb 7 13:26:03 2021 +0200

    onscreen/native: Add missing error messages
    
    g_set_error_literal() asserts that the provided message is not NULL.
    If it is NULL, the function is entirely no-op.
    
    This resulted in a NULL dereference of the GError, which remained
    NULL in this case, when trying to print a warning in
    clutter_stage_cogl_redraw_view().
    
    Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1715>

 src/backends/native/meta-onscreen-native.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/backends/native/meta-onscreen-native.c b/src/backends/native/meta-onscreen-native.c
index 50c21d26d1..5393967da0 100644
--- a/src/backends/native/meta-onscreen-native.c
+++ b/src/backends/native/meta-onscreen-native.c
@@ -1212,7 +1212,7 @@ meta_onscreen_native_direct_scanout (CoglOnscreen   *onscreen,
       g_set_error_literal (error,
                            COGL_SCANOUT_ERROR,
                            COGL_SCANOUT_ERROR_INHIBITED,
-                           NULL);
+                           "Direct scanout is inhibited during power saving mode");
       return FALSE;
     }
 
@@ -1221,7 +1221,7 @@ meta_onscreen_native_direct_scanout (CoglOnscreen   *onscreen,
       g_set_error_literal (error,
                            COGL_SCANOUT_ERROR,
                            COGL_SCANOUT_ERROR_INHIBITED,
-                           NULL);
+                           "Direct scanout is inhibited when a mode set is pending");
       return FALSE;
     }
 


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