X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=hacks%2Fphosphor.c;h=1188f2e60696504e35889b621005504dcebb0558;hb=14627f4038ada5d11456f3770090f3c39740d70f;hp=22e9495e3fd832c0608de34e17dc9e9e8850dd3a;hpb=93f25dc6827112d98b8b855ea85c8f5eb8123086;p=xscreensaver diff --git a/hacks/phosphor.c b/hacks/phosphor.c index 22e9495e..1188f2e6 100644 --- a/hacks/phosphor.c +++ b/hacks/phosphor.c @@ -1,4 +1,4 @@ -/* xscreensaver, Copyright (c) 1999 Jamie Zawinski +/* xscreensaver, Copyright (c) 1999, 2000 Jamie Zawinski * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that @@ -529,6 +529,7 @@ static void scroll (p_state *state) { int x, y; + for (x = 0; x < state->grid_width; x++) { p_cell *from = 0, *to = 0; @@ -553,7 +554,7 @@ scroll (p_state *state) } to = from; - if (to->state == FLARE || to->state == NORMAL) + if (to && (to->state == FLARE || to->state == NORMAL)) { to->state = FADE; to->changed = True;