From d14782d93fc8f277fbc9ed86e3b22d4be01a93ca Mon Sep 17 00:00:00 2001 From: Tobias Weimer Date: Fri, 4 Sep 2015 18:49:19 +0000 Subject: Whatsapp: - minor cleanup git-svn-id: http://svn.miranda-ng.org/main/trunk@15204 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/WhatsApp/src/proto.cpp | 2 +- protocols/WhatsApp/src/utils.cpp | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'protocols/WhatsApp/src') diff --git a/protocols/WhatsApp/src/proto.cpp b/protocols/WhatsApp/src/proto.cpp index f3400a94f4..a5384be1c6 100644 --- a/protocols/WhatsApp/src/proto.cpp +++ b/protocols/WhatsApp/src/proto.cpp @@ -408,7 +408,7 @@ void WhatsAppProto::NotifyEvent(const TCHAR *title, const TCHAR *info, MCONTACT pd.lchContact = contact; pd.lchIcon = IcoLib_GetIconByHandle(m_hProtoIcon); // TODO: Icon test pd.PluginData = szUrl; - pd.PluginWindowProc = (WNDPROC)PopupDlgProc; + pd.PluginWindowProc = PopupDlgProc; mir_tstrcpy(pd.lptzContactName, title); mir_tstrcpy(pd.lptzText, info); ret = PUAddPopupT(&pd); diff --git a/protocols/WhatsApp/src/utils.cpp b/protocols/WhatsApp/src/utils.cpp index 4458f976f0..946e581bbd 100644 --- a/protocols/WhatsApp/src/utils.cpp +++ b/protocols/WhatsApp/src/utils.cpp @@ -14,7 +14,9 @@ void utils::copyText(HWND hwnd, const TCHAR *text) { if (!hwnd || !text) return; - OpenClipboard(hwnd); + if (!OpenClipboard(hwnd)) + return; + EmptyClipboard(); HGLOBAL hMem = GlobalAlloc(GMEM_MOVEABLE, sizeof(TCHAR)*(mir_tstrlen(text) + 1)); mir_tstrcpy((TCHAR*)GlobalLock(hMem), text); -- cgit v1.2.3