X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fceltic.c;h=890b3982a96d6a2b98c5c0d6bf3665e64b425802;hb=aa75c7476aeaa84cf3abc192b376a8b03c325213;hp=103b64718b03814e698f2b0fb0cf1c35e476e707;hpb=6afd6db0ae9396cd7ff897ade597cd5483f49b0e;p=xscreensaver diff --git a/hacks/celtic.c b/hacks/celtic.c index 103b6471..890b3982 100644 --- a/hacks/celtic.c +++ b/hacks/celtic.c @@ -14,11 +14,12 @@ */ #include -#include #include "screenhack.h" #include "erase.h" #define SQRT_3 1.73205080756887729352 +#undef assert +#define assert(EXP) do { if (!((EXP))) abort(); } while(0) /*-----------------------------------------*/ @@ -838,7 +839,7 @@ static const char *celtic_defaults[] = { "*delay: 10000", "*delay2: 5", "*showGraph: False", -#ifdef USE_IPHONE +#ifdef HAVE_MOBILE "*ignoreRotation: True", #endif 0 @@ -978,7 +979,9 @@ celtic_draw (Display *dpy, Window window, void *closure) st->force_reset = 0; st->t = 1; - pattern_del(st->pattern); + if (st->pattern != NULL) { + pattern_del(st->pattern); + } st->pattern = NULL; graph_del(st->graph);