From 34a91d29b8b3c4896ce3d410f68ba1d588deae6f Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Tue, 6 Mar 2012 20:33:15 +0000 Subject: (suspend) fix crashing if we failed to initialize Curses --- perl-install/interactive/curses.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'perl-install/interactive') diff --git a/perl-install/interactive/curses.pm b/perl-install/interactive/curses.pm index 2015c38de..9a50522aa 100644 --- a/perl-install/interactive/curses.pm +++ b/perl-install/interactive/curses.pm @@ -44,7 +44,7 @@ sub new { sub enter_console { &suspend } sub leave_console { &end } -sub suspend { $cui->leave_curses } +sub suspend { $cui && $cui->leave_curses } sub resume { $cui->reset_curses } sub end { &suspend; print $SAVEERR $_ foreach cat_($stderr_file); unlink $stderr_file } sub exit { end(); CORE::exit($_[1] || 0) } -- cgit v1.2.1