[gnome-screensaver] Don't crash on systems that don't support XF86VM or XRANDR gamma fade



commit 904e72f40f5a02935d5dbd5392d9a9483786a2d1
Author: Chris Coulson <chrisccoulson googlemail com>
Date:   Mon May 17 21:49:16 2010 +0100

    Don't crash on systems that don't support XF86VM or XRANDR gamma fade
    
    Test if fade is supported on each screen before calling the fade_setup
    virtual function.
    
    Fixes https://bugzilla.gnome.org/show_bug.cgi?id=618925

 src/gs-fade.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/gs-fade.c b/src/gs-fade.c
index 54f30e5..89ecb5d 100644
--- a/src/gs-fade.c
+++ b/src/gs-fade.c
@@ -706,9 +706,11 @@ gs_fade_start (GSFade *fade,
 
         for (i = 0; i < fade->priv->num_screens; i++) {
                 screen_priv = &fade->priv->screen_priv[i];
-                res = screen_priv->fade_setup (fade, i);
-                if (res == FALSE)
-                        return;
+                if (screen_priv->fade_type != FADE_TYPE_NONE) {
+                        res = screen_priv->fade_setup (fade, i);
+                        if (res == FALSE)
+                                return;
+                }
         }
 
         if (fade->priv->timer_id > 0) {



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