Change 11774 by pudge@pudge-mobile on 2001/08/29 01:29:43 Add some param checking, from reports by Kevin Reid. Affected files ... ... //depot/maint-5.6/macperl/macos/ext/Mac/Controls/Controls.pm#2 edit ... //depot/maint-5.6/macperl/macos/ext/Mac/Menus/Menus.pm#2 edit ... //depot/maint-5.6/macperl/macos/ext/Mac/Windows/Windows.pm#2 edit Differences ... ==== //depot/maint-5.6/macperl/macos/ext/Mac/Controls/Controls.pm#2 (text) ==== Index: perl/macos/ext/Mac/Controls/Controls.pm --- perl/macos/ext/Mac/Controls/Controls.pm.~1~ Tue Aug 28 19:45:06 2001 +++ perl/macos/ext/Mac/Controls/Controls.pm Tue Aug 28 19:45:06 2001 @@ -516,7 +516,7 @@ =cut sub DESTROY { my($my) = @_; - DisposeControl($my->{control}); + DisposeControl($my->{control}) if $my->{control}; } =item track WINDOW, PT ==== //depot/maint-5.6/macperl/macos/ext/Mac/Menus/Menus.pm#2 (text) ==== Index: perl/macos/ext/Mac/Menus/Menus.pm --- perl/macos/ext/Mac/Menus/Menus.pm.~1~ Tue Aug 28 19:45:06 2001 +++ perl/macos/ext/Mac/Menus/Menus.pm Tue Aug 28 19:45:06 2001 @@ -84,7 +84,7 @@ # sub _HandleMenu { my($menuid, $item) = @_; - return unless $item; + return unless defined $item && defined $menuid; # ?? my($handler); if ($handler = $Menu{sprintf("%04X", $menuid)}) { $handler->handle($menuid, $item); ==== //depot/maint-5.6/macperl/macos/ext/Mac/Windows/Windows.pm#2 (text) ==== Index: perl/macos/ext/Mac/Windows/Windows.pm --- perl/macos/ext/Mac/Windows/Windows.pm.~1~ Tue Aug 28 19:45:06 2001 +++ perl/macos/ext/Mac/Windows/Windows.pm Tue Aug 28 19:45:06 2001 @@ -560,6 +560,7 @@ sub has_focus { my($my, $pane) = @_; + defined ${$my->{focusable}}[$my->{focus}] or return; return ${$my->{focusable}}[$my->{focus}] == $pane if $my->{focus} && $my->{focusable} && defined ${$my->{focusable}}[$my->{focus}]; @@ -855,6 +856,7 @@ =cut sub idle { my($self) = @_; + return unless $self->{port}; my($front) = FrontWindow(); if ($front && ${$self->{port}} == $$front) { for my $pane (@{$self->{idlefront}}) { End of Patch.