From e44d626b32c534cace3a54d54778dfa9cf3599c9 Mon Sep 17 00:00:00 2001 From: Tobias Weimer Date: Sat, 28 Feb 2015 11:12:19 +0000 Subject: Variables: -Minor fixes git-svn-id: http://svn.miranda-ng.org/main/trunk@12285 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Variables/src/parse_metacontacts.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'plugins/Variables/src/parse_metacontacts.cpp') diff --git a/plugins/Variables/src/parse_metacontacts.cpp b/plugins/Variables/src/parse_metacontacts.cpp index 9ba853fb70..281cac0556 100644 --- a/plugins/Variables/src/parse_metacontacts.cpp +++ b/plugins/Variables/src/parse_metacontacts.cpp @@ -148,10 +148,12 @@ static TCHAR *parseGetMostOnline(ARGUMENTSINFO *ai) if (szUniqueID == NULL) { szProto = PROTOID_HANDLE; + if (szProto == NULL) + return NULL; szUniqueID = (TCHAR *)mir_alloc(32); - mir_sntprintf(szUniqueID, 32, _T("%p"), hContact); - if (szProto == NULL || szUniqueID == NULL) + if (szUniqueID == NULL) return NULL; + mir_sntprintf(szUniqueID, 32, _T("%p"), hContact); } size_t size = strlen(szProto) + _tcslen(szUniqueID) + 4; -- cgit v1.2.3