Browse Source

bugfix in case getFileName() returns null

Nicolas Cannasse 7 years ago
parent
commit
01cc41a4e8
1 changed files with 1 additions and 1 deletions
  1. 1 1
      std/haxe/CallStack.hx

+ 1 - 1
std/haxe/CallStack.hx

@@ -58,7 +58,7 @@ class CallStack {
 					}
 				}
 				var fileName : String = site.getFileName();
-				var fileAddr = fileName.indexOf("file:");
+				var fileAddr = fileName == null ? -1 : fileName.indexOf("file:");
 				if( wrapCallSite != null && fileAddr > 0 )
 					fileName = fileName.substr(fileAddr + 6);
 				stack.push(FilePos(method, fileName, site.getLineNumber(), site.getColumnNumber()));