mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-01-10 04:03:22 +08:00
Fix an NPE in EntityGadget
when draft_id
isn't set
Merge pull request #1579 from Hartie95/nullfix
This commit is contained in:
commit
9781d5e6c9
@ -219,9 +219,12 @@ public class EntityGadget extends EntityBaseGadget {
|
||||
.setConfigId(this.getConfigId())
|
||||
.setGadgetState(this.getState())
|
||||
.setIsEnableInteract(true)
|
||||
.setDraftId(this.metaGadget.draft_id)
|
||||
.setAuthorityPeerId(this.getScene().getWorld().getHostPeerId());
|
||||
|
||||
if(this.metaGadget != null) {
|
||||
gadgetInfo.setDraftId(this.metaGadget.draft_id);
|
||||
}
|
||||
|
||||
if (this.getContent() != null) {
|
||||
this.getContent().onBuildProto(gadgetInfo);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user