Commit 964e73f0 authored by ah's avatar ah
Browse files

small nullpointer fix in EntityGadget, in case meta gadget is not set

parent bb8ae4c4
...@@ -219,9 +219,12 @@ public class EntityGadget extends EntityBaseGadget { ...@@ -219,9 +219,12 @@ public class EntityGadget extends EntityBaseGadget {
.setConfigId(this.getConfigId()) .setConfigId(this.getConfigId())
.setGadgetState(this.getState()) .setGadgetState(this.getState())
.setIsEnableInteract(true) .setIsEnableInteract(true)
.setDraftId(this.metaGadget.draft_id)
.setAuthorityPeerId(this.getScene().getWorld().getHostPeerId()); .setAuthorityPeerId(this.getScene().getWorld().getHostPeerId());
if(this.metaGadget != null) {
gadgetInfo.setDraftId(this.metaGadget.draft_id);
}
if (this.getContent() != null) { if (this.getContent() != null) {
this.getContent().onBuildProto(gadgetInfo); this.getContent().onBuildProto(gadgetInfo);
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment