animation: Improve error handling
animation: Improve error handling

The previous code couldn't guarantee that an animation existed when there
wasn't an error not could it guarantee that no animation was returned
when there indeed was an error.

https://bugzilla.gnome.org/show_bug.cgi?id=694148

YueLinHo/MB3Gdk-pixbuf,Distrotech/gdk-pixbuf,YueLinHo/MB3Gdk-pixbuf,GNOME/gdk-pixbuf,GNOME/gdk-pixbuf,Distrotech/gdk-pixbuf,Distrotech/gdk-pixbuf,YueLinHo/MB3Gdk-pixbuf,Distrotech/gdk-pixbuf,GNOME/gdk-pixbuf,Distrotech/gdk-pixbuf,YueLinHo/MB3Gdk-pixbuf,YueLinHo/MB3Gdk-pixbuf,GNOME/gdk-pixbuf