Skip to content

Commit

Permalink
catch failure of engine->new
Browse files Browse the repository at this point in the history
  • Loading branch information
mohawk2 committed Mar 27, 2024
1 parent 6b6a916 commit 1dd2085
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/PDL/Graphics/Simple.pm
Original file line number Diff line number Diff line change
Expand Up @@ -732,6 +732,7 @@ sub plot {
$obj = shift;
} else {
$obj = $global_plot = __PACKAGE__->new;
barf __PACKAGE__."->new failed" unless $obj;
}

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

##############################
# At long last, the parsing is over. Dispatch the call.
$obj->{obj}->{keys} = $obj->{keys};
$obj->{obj}{keys} = $obj->{keys};
$obj->{obj}->plot( $po, @blocks );
}

Expand Down

0 comments on commit 1dd2085

Please sign in to comment.