gnome-games r7442 - in trunk: . gnect/src gnibbles iagno
- From: andreasr svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-games r7442 - in trunk: . gnect/src gnibbles iagno
- Date: Sat, 1 Mar 2008 19:46:54 +0000 (GMT)
Author: andreasr
Date: Sat Mar 1 19:46:53 2008
New Revision: 7442
URL: http://svn.gnome.org/viewvc/gnome-games?rev=7442&view=rev
Log:
Fix crash when connecting to network games under certain conditions. Patch by Roger Light in bug #363015.
Modified:
trunk/ChangeLog
trunk/gnect/src/ggz-network.c
trunk/gnibbles/ggz-network.c
trunk/iagno/ggz-network.c
Modified: trunk/gnect/src/ggz-network.c
==============================================================================
--- trunk/gnect/src/ggz-network.c (original)
+++ trunk/gnect/src/ggz-network.c Sat Mar 1 19:46:53 2008
@@ -266,6 +266,7 @@
{
GtkWidget *ggzbox;
struct passwd *pwent;
+ static gboolean ggz_initialized = FALSE;
if (ggz_network_mode) {
gtk_notebook_set_current_page (GTK_NOTEBOOK (notebook), NETWORK_PAGE);
@@ -276,16 +277,19 @@
ggz_network_mode = TRUE;
prompt_player ();
- ggz_gtk_initialize (FALSE,
+ if (ggz_initialized == FALSE) {
+ ggz_initialized = TRUE;
+ ggz_gtk_initialize (FALSE,
ggz_connected, ggz_game_launched, ggz_closed,
NETWORK_ENGINE, NETWORK_VERSION, "gnect.xml",
"GGZ Gaming Zone");
+ ggzbox = ggz_gtk_create_main_area (app);
+ gtk_notebook_append_page (GTK_NOTEBOOK (notebook), ggzbox, NULL);
+ }
pwent = getpwuid(getuid());
ggz_embed_ensure_server ("GGZ Gaming Zone", "gnome.ggzgamingzone.org",
5688, pwent->pw_name);
- ggzbox = ggz_gtk_create_main_area (app);
- gtk_notebook_append_page (GTK_NOTEBOOK (notebook), ggzbox, NULL);
gtk_notebook_set_current_page (GTK_NOTEBOOK (notebook), NETWORK_PAGE);
}
Modified: trunk/gnibbles/ggz-network.c
==============================================================================
--- trunk/gnibbles/ggz-network.c (original)
+++ trunk/gnibbles/ggz-network.c Sat Mar 1 19:46:53 2008
@@ -390,6 +390,7 @@
{
GtkWidget *ggzbox;
struct passwd *pwent;
+ static gboolean ggz_initialized = FALSE;
if (ggz_network_mode) {
gtk_notebook_set_current_page (GTK_NOTEBOOK (notebook), NETWORK_PAGE);
@@ -398,16 +399,19 @@
ggz_network_mode = TRUE;
- ggz_gtk_initialize (FALSE,
+ if (ggz_initialized == FALSE) {
+ ggz_initialized = TRUE;
+ ggz_gtk_initialize (FALSE,
ggz_connected, ggz_game_launched, ggz_closed,
NETWORK_ENGINE, NETWORK_VERSION, "gnibbles.xml",
"GGZ Gaming Zone");
+ ggzbox = ggz_gtk_create_main_area (window);
+ gtk_notebook_append_page (GTK_NOTEBOOK (notebook), ggzbox, NULL);
+ }
pwent = getpwuid(getuid());
ggz_embed_ensure_server ("GGZ Gaming Zone", "gnome.ggzgamingzone.org",
5688, pwent->pw_name);
- ggzbox = ggz_gtk_create_main_area (window);
- gtk_notebook_append_page (GTK_NOTEBOOK (notebook), ggzbox, NULL);
gtk_notebook_set_current_page (GTK_NOTEBOOK (notebook), NETWORK_PAGE);
}
Modified: trunk/iagno/ggz-network.c
==============================================================================
--- trunk/iagno/ggz-network.c (original)
+++ trunk/iagno/ggz-network.c Sat Mar 1 19:46:53 2008
@@ -296,6 +296,7 @@
{
GtkWidget *ggzbox;
struct passwd *pwent;
+ static gboolean ggz_initialized = FALSE;
if (ggz_network_mode) {
@@ -306,17 +307,19 @@
init_new_game ();
ggz_network_mode = TRUE;
- ggz_gtk_initialize (FALSE,
+ if (ggz_initialized == FALSE) {
+ ggz_initialized = TRUE;
+ ggz_gtk_initialize (FALSE,
ggz_connected, ggz_game_launched, ggz_closed,
NETWORK_ENGINE, NETWORK_VERSION, "iagno.xml",
"GGZ Gaming Zone");
+ ggzbox = ggz_gtk_create_main_area (window);
+ gtk_notebook_append_page (GTK_NOTEBOOK (notebook), ggzbox, NULL);
+ }
pwent = getpwuid(getuid());
-
ggz_embed_ensure_server ("GGZ Gaming Zone", "gnome.ggzgamingzone.org",
5688, pwent->pw_name);
- ggzbox = ggz_gtk_create_main_area (window);
- gtk_notebook_append_page (GTK_NOTEBOOK (notebook), ggzbox, NULL);
gtk_notebook_set_current_page (GTK_NOTEBOOK (notebook), NETWORK_PAGE);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]