ref: 412344ff9a778ae6a07edeeedebf43a5362fae7b
parent: 2698fc9e9e29b9ef5578bf79bd4059616d9667d8
author: Simon Tatham <anakin@pobox.com>
date: Tue May 31 04:56:33 EDT 2005
Fix a couple of robustness issues. [originally from svn r5873]
--- a/gtk.c
+++ b/gtk.c
@@ -1011,7 +1011,11 @@
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) {
@@ -1199,8 +1203,6 @@
fe->pixmap = NULL;
fe->fonts = NULL;
fe->nfonts = fe->fontsize = 0;
-
- fe->timer_active = FALSE;
fe->paste_data = NULL;
fe->paste_data_len = 0;
--- a/mines.c
+++ b/mines.c
@@ -2089,6 +2089,8 @@
state->layout->me = me;
} else {
+ state->layout->rs = NULL;
+ state->layout->me = NULL;
state->layout->mines = snewn(wh, char);
x = atoi(desc);