Skip to content

Commit 2e59640

Browse files
EliteMasterEricJJ_EMPTY_STRING
authored and
JJ_EMPTY_STRING
committed
Fix null function reference for IntIterator
1 parent d676059 commit 2e59640

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
@@ -562,7 +562,8 @@ class Interp {
562562
return (v : Array<Dynamic>).iterator();
563563
if( v.iterator != null ) v = v.iterator();
564564
#else
565-
try v = v.iterator() catch( e : Dynamic ) {};
565+
#if (cpp) if ( v.iterator != null ) #end
566+
try v = v.iterator() catch( e : Dynamic ) {};
566567
#end
567568
if( v.hasNext == null || v.next == null ) error(EInvalidIterator(v));
568569
return v;

0 commit comments

Comments
 (0)