summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2007-09-24 10:46:05 +0000
committerThierry Vignaud <tv@mandriva.org>2007-09-24 10:46:05 +0000
commit34051e30d6ce922b28f178a3f24462a5ed9d0c4c (patch)
treea3699193882d1b640963e3d73ab2050326608752 /bin
parent2a5155563e135fb99194b03d4f1d84c14cddc017 (diff)
downloaddrakx-net-34051e30d6ce922b28f178a3f24462a5ed9d0c4c.tar
drakx-net-34051e30d6ce922b28f178a3f24462a5ed9d0c4c.tar.gz
drakx-net-34051e30d6ce922b28f178a3f24462a5ed9d0c4c.tar.bz2
drakx-net-34051e30d6ce922b28f178a3f24462a5ed9d0c4c.tar.xz
drakx-net-34051e30d6ce922b28f178a3f24462a5ed9d0c4c.zip
(draw_monitor) fix crash (#33023)
However, there's a race window on "gtkflush() while $isconnected == -2 || $isconnected == -1" where net_monitor can continue executing (with an empty window): Gtk-CRITICAL **: gtk_main_quit: assertion `main_loops != NULL' failed at /usr/lib/libDrakX/mygtk2.pm line 915. kid exited -1 at /usr/lib/libDrakX/run_program.pm line 167. Gtk-CRITICAL **: gtk_label_set_text: assertion `GTK_IS_LABEL (label)' failed at ./bin/net_monitor line 468. Gtk-CRITICAL **: gtk_label_set_text: assertion `GTK_IS_LABEL (label)' failed at ./bin/net_monitor line 469.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/net_monitor3
1 files changed, 3 insertions, 0 deletions
diff --git a/bin/net_monitor b/bin/net_monitor
index b9ca3de..a93fea2 100755
--- a/bin/net_monitor
+++ b/bin/net_monitor
@@ -486,6 +486,9 @@ sub draw_monitor {
defined $darea->{$intf} or return;
my $gcl = $gc_lines->{$intf};
my $pixmap = $pixmap->{$intf};
+ my $gc = $darea->{$intf}->style->white_gc;
+ # fix race on ugtk2->exit that causes a crash (#33023)
+ return 0 if !$gc;
$pixmap->draw_rectangle($darea->{$intf}->style->black_gc, 1, 0, 0, $width, $height);
my $maxr = 0;
foreach (@{$o->{stack_r}}) { $maxr = $_ if $_ > $maxr }