From cc6a2d38f38e77f2e1ba0b2fbe8554efaa3486f1 Mon Sep 17 00:00:00 2001 From: "FWoltermann@gmail.com" Date: Mon, 16 Jul 2012 17:25:12 +0000 Subject: PVS Studio warning fix: Null pointer dereference when accessing msg --- NetEx/NetPeer.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'NetEx') diff --git a/NetEx/NetPeer.cpp b/NetEx/NetPeer.cpp index 1992def..6ead8a4 100644 --- a/NetEx/NetPeer.cpp +++ b/NetEx/NetPeer.cpp @@ -162,13 +162,12 @@ NetPeer::ComposeGram() nmsg = 0; if (send_list.size() > 0) { - NetMsg* msg = 0; // if there is regular traffic, and multipart traffic if (multi_send_list.size()) { // just send one multipart message in this packet multi_msg = multi_send_list.removeIndex(0); - limit -= msg->Length(); + limit -= multi_msg->Length(); reliable = true; is_multi = true; } -- cgit v1.1