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/utils.cpp | |
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/utils.cpp')
-rw-r--r-- | protocols/WhatsApp/src/utils.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
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);
|