gnome-games r8581 - trunk/blackjack/src
- From: chpe svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-games r8581 - trunk/blackjack/src
- Date: Sun, 18 Jan 2009 15:20:14 +0000 (UTC)
Author: chpe
Date: Sun Jan 18 15:20:13 2009
New Revision: 8581
URL: http://svn.gnome.org/viewvc/gnome-games?rev=8581&view=rev
Log:
Don't reference freed memory. Regression introduced in SVN r8001.
Modified:
trunk/blackjack/src/game.cpp
Modified: trunk/blackjack/src/game.cpp
==============================================================================
--- trunk/blackjack/src/game.cpp (original)
+++ trunk/blackjack/src/game.cpp Sun Jan 18 15:20:13 2009
@@ -62,7 +62,7 @@
gint numHands;
-const gchar *game_file = "";
+gchar *game_file;
gchar *game_name;
gboolean allSettled = FALSE;
@@ -422,8 +422,8 @@
bj_show_balance (bj_get_balance ());
- if (file && strcmp (file, game_file)) {
- game_file = file;
+ if (file && (!game_file || strcmp (file, game_file) != 0)) {
+ game_file = g_strdup (file);
bj_game_eval_installed_file (file);
game_name = bj_game_file_to_name (file);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]