Fix condition in getImage
+ fix late dynamic cast in FloatinWidget (pointer could already be
deleted)