diff options
author | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2021-07-09 14:40:25 +0200 |
---|---|---|
committer | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2021-07-11 10:18:32 +0200 |
commit | d3ba0aa3e0e811631aa3f0fd9dbf0878077d395d (patch) | |
tree | 6a5479353029768c3e882aecd566c27a491dd0ed /core | |
parent | a0d800e967d6980fefc21b6d6aa1d86138004a5c (diff) |
[Net] Fix crash when receiving RPC on node without a script.
Diffstat (limited to 'core')
-rw-r--r-- | core/io/multiplayer_api.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/io/multiplayer_api.cpp b/core/io/multiplayer_api.cpp index 51ba8800e4..84f3608e0b 100644 --- a/core/io/multiplayer_api.cpp +++ b/core/io/multiplayer_api.cpp @@ -85,7 +85,7 @@ const MultiplayerAPI::RPCConfig _get_rpc_config_by_id(Node *p_node, uint16_t p_i if (id & (1 << 15)) { id = id & ~(1 << 15); config = p_node->get_node_rpc_methods(); - } else { + } else if (p_node->get_script_instance()) { config = p_node->get_script_instance()->get_rpc_methods(); } if (id < config.size()) { |