Skip to content

Commit

Permalink
Fix. Check for null parent
Browse files Browse the repository at this point in the history
  • Loading branch information
riccardobl committed Sep 15, 2020
1 parent b5a815a commit ed6085f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/java/com/jme/effekseer/EffekseerEmitterControl.java
Expand Up @@ -61,7 +61,11 @@ public boolean isChildOf(Spatial parent){

protected boolean isChildOf(Spatial spatial,Spatial parent){
if(spatial==parent)return true;
else return isChildOf(spatial.getParent(),parent);
else {
Spatial nextS=spatial.getParent();
if(nextS==null)return false;
return isChildOf(nextS,parent);
}
}

public void setEnabled(boolean enabled) {
Expand Down

0 comments on commit ed6085f

Please sign in to comment.