[banshee] [Hyena.Widgets] Fix DivideByZeroException



commit befa2b804bfaa07b49a31a53a5c5c7ae37ff9648
Author: Gabriel Burt <gabriel burt gmail com>
Date:   Thu Oct 15 11:18:08 2009 -0700

    [Hyena.Widgets] Fix DivideByZeroException
    
    AnimatedWidget was sometimes telling its child widget to allocate zero
    width or height.  Fixes LP #452366.

 .../Hyena.Gui/Hyena.Widgets/AnimatedWidget.cs      |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/Libraries/Hyena.Gui/Hyena.Widgets/AnimatedWidget.cs b/src/Libraries/Hyena.Gui/Hyena.Widgets/AnimatedWidget.cs
index a56b0e8..5b33fd4 100644
--- a/src/Libraries/Hyena.Gui/Hyena.Widgets/AnimatedWidget.cs
+++ b/src/Libraries/Hyena.Gui/Hyena.Widgets/AnimatedWidget.cs
@@ -167,7 +167,10 @@ namespace Hyena.Widgets
                         widget_alloc.Y = allocation.Height - widget_alloc.Height;
                     }
                 }
-                Widget.SizeAllocate (widget_alloc);
+
+                if (widget_alloc.Height > 0 && widget_alloc.Width > 0) {
+                    Widget.SizeAllocate (widget_alloc);
+                }
             }
         }
         
@@ -192,4 +195,4 @@ namespace Hyena.Widgets
 #endregion
         
     }
-}
\ No newline at end of file
+}



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