From 07c2762226623bc37c5daf67028ff42576f80b31 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 20 Aug 2002 23:41:53 +0000 Subject: - in destroy, detect if program is going to leave, in that case don't do anything, especially don't set the waiting mouse cursor another thing is that calling flush() at this moment causes segfault so don't do it and no more segfault :) (now, if someone finds out what this 4 is about... but you cares, it works :) this fixes program ending on an exception - also add END() calling exit() (in case a program forgets to (heurk) call exit()) --- perl-install/my_gtk.pm | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'perl-install') diff --git a/perl-install/my_gtk.pm b/perl-install/my_gtk.pm index 356b494ea..17466149a 100644 --- a/perl-install/my_gtk.pm +++ b/perl-install/my_gtk.pm @@ -125,6 +125,13 @@ sub show($) { } sub destroy($) { my ($o) = @_; + return if $^S & 4; + #- program is going to leave + #- don't do anything, especially don't set the waiting mouse cursor + #- another thing is that calling flush() at this moment causes segfault + #- so don't do it and no more segfault :) + #- (now, if someone finds out what this 4 is about... but you cares, it works :) + $o->{rwindow} and $o->{rwindow}->destroy; gtkset_mousecursor_wait(); flush(); @@ -143,6 +150,9 @@ sub exit { c::_exit($_[1]) #- workaround } +#- in case "exit" above was not called by the program +END { &exit() } + #-############################################################################### #- createXXX functions -- cgit v1.2.1