Skip to content

Commit 7c38376

Browse files
committed
Merge pull request godotengine#96464 from Faless/mp/fix_profiler_divsion_by_zero
[MP] Fix division by zero in network profiler
2 parents 7cd095d + 042b264 commit 7c38376

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/multiplayer/editor/editor_network_profiler.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,10 +227,10 @@ void EditorNetworkProfiler::add_sync_frame_data(const SyncInfo &p_frame) {
227227
sync_data[p_frame.synchronizer].outgoing_syncs += p_frame.outgoing_syncs;
228228
}
229229
SyncInfo &info = sync_data[p_frame.synchronizer];
230-
if (info.incoming_syncs) {
230+
if (p_frame.incoming_syncs) {
231231
info.incoming_size = p_frame.incoming_size / p_frame.incoming_syncs;
232232
}
233-
if (info.outgoing_syncs) {
233+
if (p_frame.outgoing_syncs) {
234234
info.outgoing_size = p_frame.outgoing_size / p_frame.outgoing_syncs;
235235
}
236236
}

0 commit comments

Comments
 (0)