Skip to content

Commit

Permalink
Fixed null crash in empty projects
Browse files Browse the repository at this point in the history
  • Loading branch information
deepnight committed Dec 29, 2023
1 parent 76d58e2 commit 47cb2a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/electron.renderer/page/Editor.hx
Original file line number Diff line number Diff line change
Expand Up @@ -1007,7 +1007,7 @@ class Editor extends Page {
}

function hasEntityInThisLayer(m:Coords) {
if( curLayerInstance.def.type!=Entities )
if( curLayerInstance==null || curLayerInstance.def.type!=Entities )
return false;

for(ei in curLayerInstance.entityInstances)
Expand Down

0 comments on commit 47cb2a3

Please sign in to comment.