projects
/
xscreensaver
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
From http://www.jwz.org/xscreensaver/xscreensaver-5.35.tar.gz
[xscreensaver]
/
hacks
/
critical.c
diff --git
a/hacks/critical.c
b/hacks/critical.c
index ab3a6f7366e3ca853b6b2031f950dd212e105ef0..81fd0c1a1056547e789302e5082bb4f03541f596 100644
(file)
--- a/
hacks/critical.c
+++ b/
hacks/critical.c
@@
-100,8
+100,10
@@
model_allocate (int model_w, int model_h)
mm->height = model_h;
mm->cells = malloc (sizeof (unsigned short) * model_w * model_h);
mm->height = model_h;
mm->cells = malloc (sizeof (unsigned short) * model_w * model_h);
- if (!mm->cells)
+ if (!mm->cells) {
+ free (mm);
return 0;
return 0;
+ }
return mm;
}
return mm;
}
@@
-290,7
+292,7
@@
critical_init (Display *dpy, Window window)
model_w = 80;
st->settings.cell_size = st->wattr.width / model_w;
model_h = st->settings.cell_size ?
model_w = 80;
st->settings.cell_size = st->wattr.width / model_w;
model_h = st->settings.cell_size ?
- st->wattr.height / st->settings.cell_size :
0
;
+ st->wattr.height / st->settings.cell_size :
1
;
/* Construct the initial model state. */
/* Construct the initial model state. */
@@
-319,7
+321,7
@@
critical_init (Display *dpy, Window window)
st->fgc = XCreateGC (st->dpy, st->window, 0, &st->gcv);
st->fgc = XCreateGC (st->dpy, st->window, 0, &st->gcv);
-#ifdef HAVE_
COCOA
+#ifdef HAVE_
JWXYZ
jwxyz_XSetAntiAliasing (dpy, st->fgc, False);
jwxyz_XSetAntiAliasing (dpy, st->bgc, False);
#endif
jwxyz_XSetAntiAliasing (dpy, st->fgc, False);
jwxyz_XSetAntiAliasing (dpy, st->bgc, False);
#endif