diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-03-04 14:14:00 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-04 14:14:00 +0100 |
commit | 4c10d31bc42f0d01d1b6a8042413a8886d19f987 (patch) | |
tree | 2d4e8aac273a7fa31b8b86d5b61d84b65cbf72ec /core | |
parent | 372b1b8f68424858f43710126c340af8a4accb48 (diff) | |
parent | 614566ddb51fe8925ef33a08534b58663338d4fc (diff) |
Merge pull request #46652 from akien-mga/remote-debugger-fix-div-by-zero
RemoteDebugger: Fix possible division by zero
Diffstat (limited to 'core')
-rw-r--r-- | core/debugger/remote_debugger.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/core/debugger/remote_debugger.cpp b/core/debugger/remote_debugger.cpp index 7392e6b9a6..bdbb7766fa 100644 --- a/core/debugger/remote_debugger.cpp +++ b/core/debugger/remote_debugger.cpp @@ -76,6 +76,7 @@ public: NetworkProfiler() {} int bandwidth_usage(const Vector<BandwidthFrame> &p_buffer, int p_pointer) { + ERR_FAIL_COND_V(p_buffer.size() == 0, 0); int total_bandwidth = 0; uint32_t timestamp = OS::get_singleton()->get_ticks_msec(); |