From 448a38557cd3a1cd06f02696ff1002656ca12fcb Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Sat, 10 Oct 2009 07:29:13 +0000 Subject: [PATCH] (trunk gtk) #2485: Crash in preferences dialog when testing the open port --- gtk/my-valgrind.sh | 2 +- gtk/tr-prefs.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/gtk/my-valgrind.sh b/gtk/my-valgrind.sh index 5d0c9b7c2..26608630c 100755 --- a/gtk/my-valgrind.sh +++ b/gtk/my-valgrind.sh @@ -2,4 +2,4 @@ export G_SLICE=always-malloc export G_DEBUG=gc-friendly export GLIBCXX_FORCE_NEW=1 -valgrind --tool=memcheck --leak-check=full --leak-resolution=high --num-callers=64 --log-file=x-valgrind --show-reachable=yes ./transmission -g /tmp/test +valgrind --tool=memcheck --leak-check=full --leak-resolution=high --num-callers=64 --log-file=x-valgrind --show-reachable=yes ./transmission -g /tmp/crash diff --git a/gtk/tr-prefs.c b/gtk/tr-prefs.c index 7c11bd4c0..12508d285 100644 --- a/gtk/tr-prefs.c +++ b/gtk/tr-prefs.c @@ -1304,7 +1304,8 @@ onPortTest( GtkButton * button UNUSED, gpointer vdata ) gtk_widget_set_sensitive( data->portButton, FALSE ); gtk_widget_set_sensitive( data->portSpin, FALSE ); gtk_label_set_markup( GTK_LABEL( data->portLabel ), _( "Testing..." ) ); - data->portTag = g_signal_connect( data->core, "port-tested", G_CALLBACK(onPortTested), data ); + if( !data->portTag ) + data->portTag = g_signal_connect( data->core, "port-tested", G_CALLBACK(onPortTested), data ); tr_core_port_test( data->core ); }