소스 검색

bugfix with dir is null

Nicolas Cannasse 2 년 전
부모
커밋
05cd1025da
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      other/memory/Memory.hx

+ 3 - 1
other/memory/Memory.hx

@@ -774,7 +774,9 @@ class Memory {
 			m.loadMemory(arg);
 		}
 		if( code != null && memory == null ) {
-			memory = new haxe.io.Path(code).dir+"/hlmemory.dump";
+			var dir = new haxe.io.Path(code).dir;
+			if( dir == null ) dir = ".";
+			memory = dir+"/hlmemory.dump";
 			if( sys.FileSystem.exists(memory) ) m.loadMemory(memory);
 		}