]> git.saurik.com Git - wxWidgets.git/commitdiff
don't call gtk_image_set_from_pixbuf() if no animation (part of patch 1586730)
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 29 Oct 2006 18:04:49 +0000 (18:04 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 29 Oct 2006 18:04:49 +0000 (18:04 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42636 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

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();
+        }
     }
 }