From b12986a6163f7634a20e34761b9b32776b64c226 Mon Sep 17 00:00:00 2001 From: Gluzskiy Alexandr Date: Wed, 19 Oct 2011 08:39:19 +0300 Subject: modified: options.cpp --- options.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'options.cpp') diff --git a/options.cpp b/options.cpp index 8fcae69..b067cb3 100755 --- a/options.cpp +++ b/options.cpp @@ -359,9 +359,12 @@ static BOOL CALLBACK DlgProcGpgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA { char *szKey = UniGetContactSettingUtf(NULL, szGPGModuleName, "GPGPubKey", ""); EmptyClipboard(); - SetClipboardData(CF_OEMTEXT, szKey); + if(!SetClipboardData(CF_OEMTEXT, szKey)) + { + mir_free(szKey); + MessageBoxA(0, "Error", "Failed to write to clipboard", MB_OK); + } CloseClipboard(); - mir_free(szKey); } else MessageBoxA(0, "Error", "Failed to open clipboard", MB_OK); -- cgit v1.2.3