Skip to content

Commit

Permalink
bugfix with dir is null
Browse files Browse the repository at this point in the history
  • Loading branch information
ncannasse committed Aug 18, 2023
1 parent aad690d commit 05cd102
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion other/memory/Memory.hx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 05cd102

Please sign in to comment.