summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-07-29 17:44:31 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-07-29 17:44:31 +0000
commit6eb6a545a869d91578dfa31844783f1f062129d0 (patch)
tree4765a5a4e1b32ef3d851ec3a11766b5d73c30624
parentc14ed6c75c2c6dfcdaf94597cfb59db42749b140 (diff)
fix for the double object deletion in MSN
git-svn-id: http://svn.miranda-ng.org/main/trunk@1242 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--include/m_system_cpp.h5
1 files changed, 3 insertions, 2 deletions
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<class T> struct OBJLIST : public LIST<T>
__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;