Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
ziqian zhang
Grasscutter
Commits
9781d5e6
Commit
9781d5e6
authored
Jul 26, 2022
by
Magix
Committed by
GitHub
Jul 26, 2022
Browse files
Fix an NPE in `EntityGadget` when `draft_id` isn't set
Merge pull request #1579 from Hartie95/nullfix
parents
107111d3
964e73f0
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/emu/grasscutter/game/entity/EntityGadget.java
View file @
9781d5e6
...
...
@@ -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
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment