Author: spouliot
Date: 2007-11-09 15:15:17 -0500 (Fri, 09 Nov 2007)
New Revision: 89343

Modified:
   trunk/moon/src/ChangeLog
   trunk/moon/src/animation.cpp
Log:
animation.cpp: Fix crash on empty BeginStoryboard (#340384)

Modified: trunk/moon/src/ChangeLog
===================================================================
--- trunk/moon/src/ChangeLog    2007-11-09 20:04:00 UTC (rev 89342)
+++ trunk/moon/src/ChangeLog    2007-11-09 20:15:17 UTC (rev 89343)
@@ -1,3 +1,7 @@
+2007-11-09  Sebastien Pouliot  <[EMAIL PROTECTED]>
+
+       * animation.cpp: Fix crash on empty BeginStoryboard (#340384)
+
 2007-11-09  Miguel de Icaza  <[EMAIL PROTECTED]>
 
        * value.h (struct Value): Cope with NULL strings.

Modified: trunk/moon/src/animation.cpp
===================================================================
--- trunk/moon/src/animation.cpp        2007-11-09 20:04:00 UTC (rev 89342)
+++ trunk/moon/src/animation.cpp        2007-11-09 20:15:17 UTC (rev 89343)
@@ -410,10 +410,8 @@
 BeginStoryboard::Fire ()
 {
        Storyboard *sb = GetStoryboard ();
-
-       g_assert (sb);
-
-       sb->Begin ();
+       if (sb)
+               sb->Begin ();
 }
 
 void
@@ -425,7 +423,8 @@
 Storyboard *
 BeginStoryboard::GetStoryboard ()
 {
-       return GetValue (BeginStoryboard::StoryboardProperty)->AsStoryboard();
+       Value *v = GetValue (BeginStoryboard::StoryboardProperty);
+       return v ? v->AsStoryboard () : NULL;
 }
 
 BeginStoryboard::~BeginStoryboard ()

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to