Permalink
Browse files

* idletermchecker: should not crash anymore on exit

  • Loading branch information...
1 parent 4b8ff62 commit 6638986c96b05b128c126bc863e4f7392c4b0ef4 @eserte committed Mar 20, 2013
Showing with 7 additions and 4 deletions.
  1. +7 −4 scripts/idletermchecker
View
@@ -237,7 +237,6 @@ sub check_tk {
if (!@terminals) {
$mw->after(1500, sub {
$mw->destroy;
- exit 0;
});
$mw->messageBox(-message => "No more watchers, exiting...");
} else {
@@ -453,10 +452,14 @@ sub check_tk {
}
}
} else {
- $mw->iconify unless $permanently_shown;
+ $mw->iconify if !$permanently_shown && Tk::Exists($mw);
+ }
+ if (Tk::Exists($mw)) {
+ $mw->update;
+ sleep 1;
+ } else {
+ exit;
}
- $mw->update;
- sleep 1;
}
}

0 comments on commit 6638986

Please sign in to comment.