From f1b82c1b06604c2c1eed750a6c980aa0b5355560 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 11 Oct 2013 14:48:19 +0300 Subject: First part of checks from Parasoft C++ Test. --- src/gui/windows/whoisonline.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/gui/windows/whoisonline.cpp') diff --git a/src/gui/windows/whoisonline.cpp b/src/gui/windows/whoisonline.cpp index e7c60bb39..68979a682 100644 --- a/src/gui/windows/whoisonline.cpp +++ b/src/gui/windows/whoisonline.cpp @@ -329,6 +329,9 @@ void WhoIsOnline::loadWebList() // Reallocate and include terminating 0 character mMemoryBuffer = static_cast( realloc(mMemoryBuffer, mDownloadedBytes + 1)); + if (!mMemoryBuffer) + return; + mMemoryBuffer[mDownloadedBytes] = '\0'; mBrowserBox->clearRows(); -- cgit v1.2.3-70-g09d2