summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/mygtk2.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/perl-install/mygtk2.pm b/perl-install/mygtk2.pm
index 802d3e355..3067df65f 100644
--- a/perl-install/mygtk2.pm
+++ b/perl-install/mygtk2.pm
@@ -615,7 +615,7 @@ sub _gtk_any_Window {
}
$w->set_modal(delete $opts->{modal}) if exists $opts->{modal};
- $opts->{transient_for} ||= $::main_window;
+ $opts->{transient_for} ||= $::main_window if $::main_window;
$w->set_modal(1) if exists $opts->{transient_for};
$w->set_transient_for(delete $opts->{transient_for}) if exists $opts->{transient_for};
$w->set_border_width(delete $opts->{border_width}) if exists $opts->{border_width};