From 6eb6a545a869d91578dfa31844783f1f062129d0 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 29 Jul 2012 17:44:31 +0000 Subject: fix for the double object deletion in MSN git-svn-id: http://svn.miranda-ng.org/main/trunk@1242 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- include/m_system_cpp.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/m_system_cpp.h b/include/m_system_cpp.h index 4c8656b4e2..2e71c4dcff 100644 --- a/include/m_system_cpp.h +++ b/include/m_system_cpp.h @@ -195,8 +195,9 @@ template struct OBJLIST : public LIST __inline int remove(T* p) { - if (List_RemovePtr((SortedList*)this, p) != -1) { - delete p; + int i = getIndex( p ); + if ( i != -1 ) { + remove(i); return 1; } return 0; -- cgit v1.2.3