From d6abea3ba78fefbceb216ddf288909d112f3884f Mon Sep 17 00:00:00 2001 From: Dor Askayo Date: Sun, 7 Feb 2021 13:26:03 +0200 Subject: [PATCH] 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: --- 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 50c21d26d..5393967da 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; }