From: Simon Tatham Date: Tue, 31 May 2005 08:56:33 +0000 (+0000) Subject: Fix a couple of robustness issues. X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=commitdiff_plain;h=412344ff9a778ae6a07edeeedebf43a5362fae7b;p=sgt-puzzles.git Fix a couple of robustness issues. [originally from svn r5873] --- diff --git a/gtk.c b/gtk.c index 81aeda1..742c18c 100644 --- a/gtk.c +++ b/gtk.c @@ -1011,7 +1011,11 @@ static frontend *new_window(char *game_id, char **error) fe = snew(frontend); + fe->timer_active = FALSE; + fe->timer_id = -1; + fe->me = midend_new(fe, &thegame); + if (game_id) { *error = midend_game_id(fe->me, game_id); if (*error) { @@ -1200,8 +1204,6 @@ static frontend *new_window(char *game_id, char **error) fe->fonts = NULL; fe->nfonts = fe->fontsize = 0; - fe->timer_active = FALSE; - fe->paste_data = NULL; fe->paste_data_len = 0; diff --git a/mines.c b/mines.c index e0add2a..62af8cb 100644 --- a/mines.c +++ b/mines.c @@ -2089,6 +2089,8 @@ static game_state *new_game(midend_data *me, game_params *params, char *desc) state->layout->me = me; } else { + state->layout->rs = NULL; + state->layout->me = NULL; state->layout->mines = snewn(wh, char); x = atoi(desc);