aboutsummaryrefslogtreecommitdiff
path: root/windows.c
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2005-08-03 12:44:51 +0000
committerSimon Tatham <anakin@pobox.com>2005-08-03 12:44:51 +0000
commit414330d9ad00e3b788d48b1d928e46ad7698c508 (patch)
tree5b8d4185b832f4bc248ffeca46fe444e1276937f /windows.c
parentc212a1b5ebc69cb4818053474aa7fea9043f70fd (diff)
downloadpuzzles-414330d9ad00e3b788d48b1d928e46ad7698c508.zip
puzzles-414330d9ad00e3b788d48b1d928e46ad7698c508.tar.gz
puzzles-414330d9ad00e3b788d48b1d928e46ad7698c508.tar.bz2
puzzles-414330d9ad00e3b788d48b1d928e46ad7698c508.tar.xz
Cleanups from James H: a few missing statics, a precautionary cast
or two, a debugging fix, a couple of explicit initialisations of variables that were previously read uninitialised, and a fix for a whopping great big memory leak in Slant owing to me having completely forgotten to write free_game(). [originally from svn r6159]
Diffstat (limited to 'windows.c')
-rw-r--r--windows.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/windows.c b/windows.c
index 08513d8..f9af41c 100644
--- a/windows.c
+++ b/windows.c
@@ -417,7 +417,7 @@ void end_draw(frontend *fe)
void deactivate_timer(frontend *fe)
{
- KillTimer(fe->hwnd, fe->timer);
+ if (fe->hwnd) KillTimer(fe->hwnd, fe->timer);
fe->timer = 0;
}
@@ -575,9 +575,11 @@ static frontend *new_window(HINSTANCE inst, char *game_id, char **error)
find_help_file(fe);
fe->inst = inst;
- midend_new_game(fe->me);
fe->timer = 0;
+ fe->hwnd = NULL;
+
+ midend_new_game(fe->me);
fe->fonts = NULL;
fe->nfonts = fe->fontsize = 0;