[vte] widget: Fix value type check



commit fb604fe287abf64645a83ef27e2c05da14fbbae0
Author: Christian Persch <chpe src gnome org>
Date:   Mon Sep 5 00:03:52 2022 +0200

    widget: Fix value type check

 src/clipboard-gtk.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/clipboard-gtk.cc b/src/clipboard-gtk.cc
index fdb19af5..491a40c7 100644
--- a/src/clipboard-gtk.cc
+++ b/src/clipboard-gtk.cc
@@ -388,7 +388,7 @@ public:
         get_value(GValue* value,
                   GError** error)
         {
-                if (g_value_get_gtype(value) == G_TYPE_STRING) {
+                if (G_VALUE_HOLDS(value, G_TYPE_STRING)) {
                         if (auto const delegate = m_offer->clipboard().m_delegate.lock()) {
                                 auto const str = (*delegate.*m_offer->m_get_callback)(m_offer->clipboard(), 
ClipboardFormat::TEXT);
                                 if (!str)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]