From 0fa87a5066e542f1f4aed2a3addcb9a97644e455 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 19 Nov 2012 21:58:13 +0000 Subject: thanks Pescuma for writing a good comment about the broken resident variables deletion 4 yrs ago :) git-svn-id: http://svn.miranda-ng.org/main/trunk@2382 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/modules/extraicons/IcolibExtraIcon.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/modules/extraicons/IcolibExtraIcon.cpp b/src/modules/extraicons/IcolibExtraIcon.cpp index e5727eac53..f6ff24300f 100644 --- a/src/modules/extraicons/IcolibExtraIcon.cpp +++ b/src/modules/extraicons/IcolibExtraIcon.cpp @@ -30,11 +30,9 @@ IcolibExtraIcon::IcolibExtraIcon(int _id, const char *_name, const TCHAR *_descr MIRANDAHOOKPARAM _OnClick, LPARAM _param) : BaseExtraIcon(_id, _name, _description, _descIcon, _OnClick, _param) { - #ifndef _DEBUG - char setting[512]; - mir_snprintf(setting, SIZEOF(setting), "%s/%s", MODULE_NAME, _name); - CallService(MS_DB_SETSETTINGRESIDENT, TRUE, (WPARAM) setting); - #endif + char setting[512]; + mir_snprintf(setting, SIZEOF(setting), "%s/%s", MODULE_NAME, _name); + CallService(MS_DB_SETSETTINGRESIDENT, TRUE, (WPARAM) setting); } IcolibExtraIcon::~IcolibExtraIcon() @@ -129,6 +127,7 @@ void IcolibExtraIcon::storeIcon(HANDLE hContact, void *icon) const char *icolibName = (const char *) icon; if ( IsEmpty(icolibName)) - icolibName = ""; - db_set_s(hContact, MODULE_NAME, name.c_str(), icolibName); + db_unset(hContact, MODULE_NAME, name.c_str()); + else + db_set_s(hContact, MODULE_NAME, name.c_str(), icolibName); } -- cgit v1.2.3