From b6415056b97c1454b452a34f07de5bfa1be34593 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Fri, 22 Feb 2008 18:16:00 +0000 Subject: make sure not to run timers after quitting the main loop (#37635) --- NEWS | 1 + bin/net_monitor | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index dbbaaf2..a171856 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,7 @@ o make expose_event callback more robust (#36537) o make sure widgets got realized before any event callback is called (#36537) + o make sure not to run timers after quitting the main loop (#37635) 0.25: - draksambashare (aginies): diff --git a/bin/net_monitor b/bin/net_monitor index bf8f4f0..5c6464b 100755 --- a/bin/net_monitor +++ b/bin/net_monitor @@ -139,7 +139,7 @@ $window1->{window}->show_all; # make sure widgets got realized before any event callback is called (#36537): gtkflush(); -Glib::Timeout->add(1000, \&rescan); +my $time_tag1 = Glib::Timeout->add(1000, \&rescan); my $time_tag2 = Glib::Timeout->add(1000, \&update); update(); @@ -173,6 +173,9 @@ my $during_connection; my $first; sub main_quit() { + foreach my $timeout ($time_tag1, $time_tag2) { + Glib::Source->remove($timeout) if $timeout; + } $config{use_same_scale} = bool2yesno($use_same_scale); setVarsInSh($cfg_file, \%config); ugtk2->exit(0); -- cgit v1.2.1