>From db777bd34f1452281963a4db27914a6a31a29549 Mon Sep 17 00:00:00 2001 From: =?UTF-8?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 8ab74744f3..447c839f45 100644 --- a/src/pgtkselect.c +++ b/src/pgtkselect.c @@ -518,7 +518,7 @@ DEFUN ("pgtk-selection-owner-p", Fpgtk_selection_owner_p, Spgtk_selection_owner_ 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.32.0.rc0