Skip to content

Commit 663a0b5

Browse files
Fix null function reference for IntIterator on cpp (#115)
1 parent 04e7d65 commit 663a0b5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

hscript/Interp.hx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,8 @@ class Interp {
572572
return (v : Array<Dynamic>).iterator();
573573
if( v.iterator != null ) v = v.iterator();
574574
#else
575-
try v = v.iterator() catch( e : Dynamic ) {};
575+
#if (cpp) if ( v.iterator != null ) #end
576+
try v = v.iterator() catch( e : Dynamic ) {};
576577
#end
577578
if( v.hasNext == null || v.next == null ) error(EInvalidIterator(v));
578579
return v;

0 commit comments

Comments
 (0)