[gtk+] gdk: Use a better error message
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] gdk: Use a better error message
- Date: Fri, 27 Feb 2015 21:02:30 +0000 (UTC)
commit 7cee6c5cc6f35d9ed453f943686c0b21e86b4a3e
Author: Emmanuele Bassi <ebassi gnome org>
Date: Fri Feb 27 21:00:16 2015 +0000
gdk: Use a better error message
Having "Assertion failed: success" on the console is not going to help
anyone.
gdk/win32/gdkdisplay-win32.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/gdk/win32/gdkdisplay-win32.c b/gdk/win32/gdkdisplay-win32.c
index b4f004d..0a75f45 100644
--- a/gdk/win32/gdkdisplay-win32.c
+++ b/gdk/win32/gdkdisplay-win32.c
@@ -355,7 +355,12 @@ inner_clipboard_window_procedure (HWND hwnd,
GdkWindow *owner;
success = OpenClipboard (hwnd);
- g_return_val_if_fail (success, 0);
+ if (!success)
+ {
+ g_warning ("Failed to OpenClibpboard on window handle %p", hwnd);
+ return 0;
+ }
+
hwndOwner = GetClipboardOwner ();
owner = gdk_win32_window_lookup_for_display (_gdk_display, hwndOwner);
if (owner == NULL)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]