Skip to content

Commit ebc17ba

Browse files
committed
Fixes the crash upon receival of snapshot while the client controller is not initialized.
1 parent 9744bee commit ebc17ba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scene_synchronizer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3667,7 +3667,7 @@ bool ClientSynchronizer::parse_snapshot(DataBuffer &p_snapshot) {
36673667
ParseData *pd = static_cast<ParseData *>(p_user_pointer);
36683668

36693669
// Extract the InputID for the controller processed as Authority by this client.
3670-
const FrameIndex authority_frame_index = MapFunc::at(p_peers_frames_index, pd->player_controller->get_authority_peer(), FrameIndex::NONE);
3670+
const FrameIndex authority_frame_index = pd->player_controller ? MapFunc::at(p_peers_frames_index, pd->player_controller->get_authority_peer(), FrameIndex::NONE) : FrameIndex::NONE;
36713671

36723672
// Store it.
36733673
pd->snapshot.input_id = authority_frame_index;

0 commit comments

Comments
 (0)