Correctly store pointer to new state struct with screenhack framework on window resiz...
[screensavers] / hacks / WolframAutomata / WolframAutomata.c
index 5349b1a..1dac50e 100644 (file)
@@ -249,7 +249,7 @@ static void
 WolframAutomata_reshape(Display * dpy, Window win, void * closure, unsigned int w, unsigned int h)
 {
     WolframAutomata_free(dpy, win, closure);
 WolframAutomata_reshape(Display * dpy, Window win, void * closure, unsigned int w, unsigned int h)
 {
     WolframAutomata_free(dpy, win, closure);
-    WolframAutomata_init(dpy, win);
+    closure = WolframAutomata_init(dpy, win);
 }
 
 XSCREENSAVER_MODULE ("1D Nearest-Neighbor Cellular Automata", WolframAutomata)
 }
 
 XSCREENSAVER_MODULE ("1D Nearest-Neighbor Cellular Automata", WolframAutomata)