~gnome3-team/gnome-screensaver/ubuntu

« back to all changes in this revision

Viewing changes to debian/patches/15_dont_crash_on_no_fade.patch

  • Committer: Chris Coulson
  • Date: 2010-05-19 09:47:46 UTC
  • Revision ID: chrisccoulson@ubuntu.com-20100519094746-ory9nlmo8qn5r7dc
* debian/patches/15_dont_crash_on_no_fade.patch:
  - Add another check in gs_fade_reset

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
Author: Chris Coulson <chris.coulson@canonical.com>
8
8
 
9
9
diff -Nur -x '*.orig' -x '*~' gnome-screensaver-2.30.0/src/gs-fade.c gnome-screensaver-2.30.0.new/src/gs-fade.c
10
 
--- gnome-screensaver-2.30.0/src/gs-fade.c      2010-05-17 18:16:41.112075976 +0100
11
 
+++ gnome-screensaver-2.30.0.new/src/gs-fade.c  2010-05-17 18:29:16.172072778 +0100
 
10
--- gnome-screensaver-2.30.0/src/gs-fade.c      2010-05-19 10:27:34.822957696 +0100
 
11
+++ gnome-screensaver-2.30.0.new/src/gs-fade.c  2010-05-19 10:36:25.830455367 +0100
12
12
@@ -727,9 +727,11 @@
13
13
 
14
14
         for (i = 0; i < fade->priv->num_screens; i++) {
24
24
         }
25
25
 
26
26
         if (fade->priv->timer_id > 0) {
 
27
@@ -846,6 +848,8 @@
 
28
 gs_fade_reset (GSFade *fade)
 
29
 {
 
30
         int i;
 
31
+        GSFadeScreenPrivate *screen_priv;
 
32
+
 
33
         g_return_if_fail (GS_IS_FADE (fade));
 
34
 
 
35
         gs_debug ("Resetting fade");
 
36
@@ -858,8 +862,12 @@
 
37
 
 
38
         gs_fade_set_alpha (fade, fade->priv->current_alpha);
 
39
 
 
40
-        for (i = 0; i < fade->priv->num_screens; i++)
 
41
-                fade->priv->screen_priv[i].fade_finish (fade, i);
 
42
+        for (i = 0; i < fade->priv->num_screens; i++) {
 
43
+                screen_priv = &fade->priv->screen_priv[i];
 
44
+                if (screen_priv->fade_type != FADE_TYPE_NONE) {
 
45
+                        screen_priv->fade_finish (fade, i);
 
46
+                }
 
47
+        }
 
48
 }
 
49
 
 
50
 static void