From 7673b6b9eb0af3add73e1614a466f142092b00aa Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jind=C5=99ich=20Makovi=C4=8Dka?= Date: Sun, 30 May 2021 11:40:45 +0200 Subject: [PATCH] * src/pgtkselect.c: Avoid Glib assertion warnings Do not call g_object_get_qdata, when the clipboard has no owner, and obj is NULL. Just return Qnil immediately. --- src/pgtkselect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pgtkselect.c b/src/pgtkselect.c index 8ab74744f39..447c839f459 100644 --- a/src/pgtkselect.c +++ b/src/pgtkselect.c @@ -518,7 +518,7 @@ On Nextstep, TERMINAL is unused. */) obj = gtk_clipboard_get_owner (cb); - return g_object_get_qdata (obj, quark_data) != NULL ? Qt : Qnil; + return obj && g_object_get_qdata (obj, quark_data) != NULL ? Qt : Qnil; } -- 2.39.5