]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/animate.cpp
Removed GetAdjustedBestSize().
[wxWidgets.git] / src / gtk / animate.cpp
index a2e17e22aa537e458199520bad660382cec3a1be..23b88a192da725945379d54ce6985abce26df537 100644 (file)
@@ -351,10 +351,17 @@ void wxAnimationCtrl::DisplayStaticImage()
     }
     else
     {
-        // even if not clearly documented, gdk_pixbuf_animation_get_static_image()
-        // always returns the first frame of the animation
-        gtk_image_set_from_pixbuf(GTK_IMAGE(m_widget),
-                                    gdk_pixbuf_animation_get_static_image(m_anim));
+        if (m_anim)
+        {
+            // even if not clearly documented, gdk_pixbuf_animation_get_static_image()
+            // always returns the first frame of the animation
+            gtk_image_set_from_pixbuf(GTK_IMAGE(m_widget),
+                                        gdk_pixbuf_animation_get_static_image(m_anim));
+        }
+        else
+        {
+            ClearToBackgroundColour();
+        }
     }
 }