diff options
author | Tobias Weimer <wishmaster51@googlemail.com> | 2015-09-04 18:49:19 +0000 |
---|---|---|
committer | Tobias Weimer <wishmaster51@googlemail.com> | 2015-09-04 18:49:19 +0000 |
commit | d14782d93fc8f277fbc9ed86e3b22d4be01a93ca (patch) | |
tree | ef6b47a34beeff3d66310017a77081a64f741621 /protocols/WhatsApp/src | |
parent | 5d61b90dba11638d99d7efce12456540dd4e4185 (diff) |
Whatsapp:
- minor cleanup
git-svn-id: http://svn.miranda-ng.org/main/trunk@15204 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/WhatsApp/src')
-rw-r--r-- | protocols/WhatsApp/src/proto.cpp | 2 | ||||
-rw-r--r-- | protocols/WhatsApp/src/utils.cpp | 4 |
2 files changed, 4 insertions, 2 deletions
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);
|