Skip to content

Commit 4cd9cd4

Browse files
committed
catch failure of Simple->new
1 parent 6b6a916 commit 4cd9cd4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/PDL/Graphics/Simple.pm

+2-1
Original file line numberDiff line numberDiff line change
@@ -732,6 +732,7 @@ sub plot {
732732
$obj = shift;
733733
} else {
734734
$obj = $global_plot = __PACKAGE__->new;
735+
barf __PACKAGE__."->new failed" unless $obj;
735736
}
736737

737738
my $curve_options = PDL::Options->new( {
@@ -1040,7 +1041,7 @@ sub plot {
10401041

10411042
##############################
10421043
# At long last, the parsing is over. Dispatch the call.
1043-
$obj->{obj}->{keys} = $obj->{keys};
1044+
$obj->{obj}{keys} = $obj->{keys};
10441045
$obj->{obj}->plot( $po, @blocks );
10451046
}
10461047

0 commit comments

Comments
 (0)