Fix bug in error reporting for --save caused by freeing 'realname'

before the error messages wanted to use it.

[originally from svn r9374]
This commit is contained in:
Simon Tatham
2011-12-28 18:07:46 +00:00
parent 236f965093
commit b5cb02b61a

2
gtk.c
View File

@ -2704,7 +2704,6 @@ int main(int argc, char **argv)
strerror(errno)); strerror(errno));
return 1; return 1;
} }
sfree(realname);
ctx.error = 0; ctx.error = 0;
midend_serialise(me, savefile_write, &ctx); midend_serialise(me, savefile_write, &ctx);
if (ctx.error) { if (ctx.error) {
@ -2717,6 +2716,7 @@ int main(int argc, char **argv)
strerror(errno)); strerror(errno));
return 1; return 1;
} }
sfree(realname);
} }
if (!doc && !savefile) { if (!doc && !savefile) {
id = midend_get_game_id(me); id = midend_get_game_id(me);