chiark / gitweb /
Don't forget to NULL out the new game id notification callback, or
authorSimon Tatham <anakin@pobox.com>
Sat, 6 Apr 2013 08:08:15 +0000 (08:08 +0000)
committerSimon Tatham <anakin@pobox.com>
Sat, 6 Apr 2013 08:08:15 +0000 (08:08 +0000)
else it might start off accidentally initialised to nonsense in front
ends which don't use it.

[originally from svn r9817]

midend.c

index 2e8b7f6f7c817e984fa3f4568b0b7654d52ea427..41d562aa9e5d18361b27975cd9c9a9a394fa14ca 100644 (file)
--- a/midend.c
+++ b/midend.c
@@ -109,6 +109,9 @@ midend *midend_new(frontend *fe, const game *ourgame,
     me->nstates = me->statesize = me->statepos = 0;
     me->states = NULL;
     me->params = ourgame->default_params();
+    me->game_id_change_notify_function = NULL;
+    me->game_id_change_notify_ctx = NULL;
+
     /*
      * Allow environment-based changing of the default settings by
      * defining a variable along the lines of `NET_DEFAULT=25x25w'