[gtk/wip/matthiasc/popup5: 121/145] tooltip: fix critical warnings



commit 2826c99e7fb98defd1d98162045f09258b68b441
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon May 20 12:17:12 2019 +0000

    tooltip: fix critical warnings
    
    We might trigger a requery while unrooted.
    Deal with it.

 gtk/gtktooltip.c | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/gtk/gtktooltip.c b/gtk/gtktooltip.c
index 59625f831d..2e7702574c 100644
--- a/gtk/gtktooltip.c
+++ b/gtk/gtktooltip.c
@@ -400,6 +400,9 @@ gtk_tooltip_trigger_tooltip_query (GtkWidget *widget)
 
   toplevel = GTK_WIDGET (gtk_widget_get_root (widget));
 
+  if (toplevel == NULL)
+    return;
+
   if (gtk_native_get_surface (GTK_NATIVE (toplevel)) != surface)
     return;
 


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