[gtk+] GtkStyle: Do not warn if attach count == 0



commit 5d496aa7f3d05c7e449580c6f8d36154b66d2636
Author: Carlos Garnacho <carlosg gnome org>
Date:   Wed Nov 24 01:11:26 2010 +0100

    GtkStyle: Do not warn if attach count == 0
    
    This is going go happen more and more often now, as realize handlers start
    removing the gtk_widget_style_attach() calls.

 gtk/gtkstyle.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkstyle.c b/gtk/gtkstyle.c
index 1d07ddf..cdd1249 100644
--- a/gtk/gtkstyle.c
+++ b/gtk/gtkstyle.c
@@ -954,8 +954,10 @@ void
 gtk_style_detach (GtkStyle *style)
 {
   g_return_if_fail (GTK_IS_STYLE (style));
-  g_return_if_fail (style->attach_count > 0);
-  
+
+  if (style->attach_count == 0)
+    return;
+
   style->attach_count -= 1;
   if (style->attach_count == 0)
     {



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