From: Dan Boger Date: Thu, 28 Jan 2010 23:09:30 +0000 (-0800) Subject: Make sure we don't try to print to an undefined filehandle, if there's an error when... X-Git-Url: https://git.sommitrealweird.co.uk/twirssi-net-twitter-lite.git/commitdiff_plain/d20663fe364a824f07b46882cfde798f108f27f6?ds=sidebyside;hp=-c Make sure we don't try to print to an undefined filehandle, if there's an error when loading the initial friends list --- d20663fe364a824f07b46882cfde798f108f27f6 diff --git a/twirssi.pl b/twirssi.pl index c133378..64c344f 100644 --- a/twirssi.pl +++ b/twirssi.pl @@ -524,7 +524,7 @@ sub cmd_login { ); } else { $twit = Net::Twitter->new( - traits => [ 'API::REST', 'OAuth', 'API::Search' ], + traits => [ 'API::REST', 'OAuth', 'API::Search' ], consumer_key => 'BZVAvBma4GxdiRwXIvbnw', consumer_secret => '0T5kahwLyb34vciGZsgkA9lsjtGCQ05vxVE2APXM', @@ -955,7 +955,8 @@ sub load_friends { }; if ($@) { - print $fh "type:debug Error during friends list update. Aborted.\n"; + print $fh "type:debug Error during friends list update. Aborted.\n" + if $fh; return; }