aboutsummaryrefslogtreecommitdiffstats
path: root/gtk/io_stat.c
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2008-01-20 16:53:53 +0000
committerStig Bjørlykke <stig@bjorlykke.org>2008-01-20 16:53:53 +0000
commitedf727387f9d7a545a74ef7c7c2e9262c5fe496b (patch)
tree753567001e4d4674a2fcfb503fd119c6a73fd19e /gtk/io_stat.c
parent8f8bce5175d5752d17b80efc3798f274e8abbd11 (diff)
downloadwireshark-edf727387f9d7a545a74ef7c7c2e9262c5fe496b.tar.gz
wireshark-edf727387f9d7a545a74ef7c7c2e9262c5fe496b.tar.bz2
wireshark-edf727387f9d7a545a74ef7c7c2e9262c5fe496b.zip
Fixed crash when save IO Graphs (bug 2126).
The problem was that configure_event() is called each time the window size changes, and each time the pixmap buffer is recreated and a new signal added to the save button. svn path=/trunk/; revision=24145
Diffstat (limited to 'gtk/io_stat.c')
-rw-r--r--gtk/io_stat.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gtk/io_stat.c b/gtk/io_stat.c
index 0ec059569c..786b0fea90 100644
--- a/gtk/io_stat.c
+++ b/gtk/io_stat.c
@@ -1205,7 +1205,7 @@ configure_event(GtkWidget *widget, GdkEventConfigure *event _U_)
#if GTK_CHECK_VERSION(2,6,0)
save_bt = OBJECT_GET_DATA(io->window, "save_bt");
- SIGNAL_CONNECT(save_bt, "clicked", pixmap_save_cb, io->pixmap);
+ OBJECT_SET_DATA(save_bt, "pixmap", io->pixmap);
gtk_widget_set_sensitive(save_bt, TRUE);
#endif
@@ -2050,6 +2050,7 @@ init_io_stat_window(io_stat_t *io)
save_bt = OBJECT_GET_DATA(bbox, GTK_STOCK_SAVE);
gtk_widget_set_sensitive(save_bt, FALSE);
gtk_tooltips_set_tip(tooltips, save_bt, "Save the displayed graph to a file", NULL);
+ SIGNAL_CONNECT(save_bt, "clicked", pixmap_save_cb, NULL);
OBJECT_SET_DATA(io->window, "save_bt", save_bt);
#endif