[gimp] app: fix crash with a NULL highlight area.



commit cd3b3b8dd40bfb8a0644357d4d94284433f9b4be
Author: Jehan <jehan girinstud io>
Date:   Thu Feb 25 19:24:54 2021 +0100

    app: fix crash with a NULL highlight area.

 app/widgets/gimpwidgets-utils.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/app/widgets/gimpwidgets-utils.c b/app/widgets/gimpwidgets-utils.c
index 5c18cd4c47..7ac5fd3189 100644
--- a/app/widgets/gimpwidgets-utils.c
+++ b/app/widgets/gimpwidgets-utils.c
@@ -1298,7 +1298,8 @@ gimp_highlight_widget (GtkWidget    *widget,
                                                       "gimp-widget-highlight"));
   old_rect = g_object_get_data (G_OBJECT (widget), "gimp-widget-highlight-rect");
 
-  if (highlight && old_highlight && ! gdk_rectangle_equal (rect, old_rect))
+  if (highlight && old_highlight &&
+      rect && old_rect && ! gdk_rectangle_equal (rect, old_rect))
     {
       /* Highlight area changed. */
       gimp_highlight_widget (widget, FALSE, NULL);


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