summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xoptions.cpp7
1 files changed, 5 insertions, 2 deletions
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);