summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/CrashDumper/src/utils.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/plugins/CrashDumper/src/utils.cpp b/plugins/CrashDumper/src/utils.cpp
index 916fe00275..a592a9f9bc 100644
--- a/plugins/CrashDumper/src/utils.cpp
+++ b/plugins/CrashDumper/src/utils.cpp
@@ -614,12 +614,13 @@ void StoreStringToClip(CMString& buffer)
GlobalUnlock(hData);
- OpenClipboard(NULL);
- EmptyClipboard();
+ if(OpenClipboard(NULL)) {
+ EmptyClipboard();
- SetClipboardData(CF_UNICODETEXT, hData);
- CloseClipboard();
+ SetClipboardData(CF_UNICODETEXT, hData);
+ CloseClipboard();
+ }
}
bool IsPluginEnabled(TCHAR* filename)