From 052c41ae312ff8ab0cec8b739070790cd98042c9 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 7 Sep 2013 20:19:08 +0000 Subject: crash fix for IEView git-svn-id: http://svn.miranda-ng.org/main/trunk@6010 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/IEView/src/HTMLBuilder.cpp | 8 ++++---- plugins/IEView/src/ieview_common.h | 1 + plugins/IEView/src/ieview_main.cpp | 2 ++ 3 files changed, 7 insertions(+), 4 deletions(-) (limited to 'plugins/IEView') diff --git a/plugins/IEView/src/HTMLBuilder.cpp b/plugins/IEView/src/HTMLBuilder.cpp index 6934a72764..425db0a236 100644 --- a/plugins/IEView/src/HTMLBuilder.cpp +++ b/plugins/IEView/src/HTMLBuilder.cpp @@ -280,10 +280,10 @@ wchar_t *HTMLBuilder::getContactName(HANDLE hContact, const char *szProto) } if (szName != NULL) return szName; - TCHAR *szNameStr = (TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR); - if (szNameStr != NULL) { - return szNameStr; - } + TCHAR *szNameStr = pcli->pfnGetContactDisplayName(hContact, 0); + if (szNameStr != NULL) + return mir_tstrdup(szNameStr); + return mir_tstrdup(TranslateT("(Unknown Contact)")); } diff --git a/plugins/IEView/src/ieview_common.h b/plugins/IEView/src/ieview_common.h index e4df51f61a..fbfb60b3ec 100644 --- a/plugins/IEView/src/ieview_common.h +++ b/plugins/IEView/src/ieview_common.h @@ -38,6 +38,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include #include +#include #include #include #include diff --git a/plugins/IEView/src/ieview_main.cpp b/plugins/IEView/src/ieview_main.cpp index 20446ab8f4..dbcceb8a93 100644 --- a/plugins/IEView/src/ieview_main.cpp +++ b/plugins/IEView/src/ieview_main.cpp @@ -21,6 +21,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "ieview_common.h" HINSTANCE hInstance; +CLIST_INTERFACE *pcli; char *workingDirUtf8; int hLangpack; @@ -67,6 +68,7 @@ extern "C" int __declspec(dllexport) Load(void) delete workingDir; mir_getLP(&pluginInfoEx); + mir_getCLI(); HookEvent(ME_OPT_INITIALISE, IEViewOptInit); HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded); -- cgit v1.2.3