Skip to content

Commit 9bf601b

Browse files
committed
load_texture check for undef $x/$y
1 parent d8e1bca commit 9bf601b

File tree

1 file changed

+1
-0
lines changed
  • lib/PDL/Graphics/TriD

1 file changed

+1
-0
lines changed

lib/PDL/Graphics/TriD/GL.pm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@ sub load_idx_buffer {
188188
sub load_texture {
189189
my ($this, $idname, $pdl, $iformat, $x, $y, $format, $type, $target) = @_;
190190
PDL::barf ref($this)."::load_texture: undef ndarray" if !defined $pdl;
191+
PDL::barf ref($this)."::load_texture: undef \$x/\$y" if grep !defined, $x, $y;
191192
$type //= GL_FLOAT;
192193
$target //= GL_TEXTURE_2D;
193194
# ||= as only need one, even if re-setup

0 commit comments

Comments
 (0)