[aisleriot] sol: Store new game module name before attempting load
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [aisleriot] sol: Store new game module name before attempting load
- Date: Sat, 3 Dec 2011 19:29:55 +0000 (UTC)
commit 89691503ba6a5fc4f24d9f5ffbbeccc6628e1722
Author: Christian Persch <chpe gnome org>
Date: Sat Dec 3 20:25:17 2011 +0100
sol: Store new game module name before attempting load
This way the exception won't print the name of the old one.
src/game.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/src/game.c b/src/game.c
index eb8d5ba..c9cdef8 100644
--- a/src/game.c
+++ b/src/game.c
@@ -1794,6 +1794,8 @@ aisleriot_game_load_game (AisleriotGame *game,
game->had_exception = FALSE;
for (i = 0; i < N_LAMBDAS; ++i)
game->lambdas[i] = SCM_UNDEFINED;
+ g_free (game->game_module);
+ game->game_module = g_strdup (game_module);
scm_c_catch (SCM_BOOL_T,
(scm_t_catch_body) game_scm_load_game, (void *) game_module,
@@ -1806,9 +1808,6 @@ aisleriot_game_load_game (AisleriotGame *game,
return FALSE;
}
- g_free (game->game_module);
- game->game_module = g_strdup (game_module);
-
set_game_state (game, GAME_LOADED);
g_object_notify (object, "game-file");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]