The assumption, that parent() of a KateDynamicAnimation is either a KateView or a KateDocument fails when the animation gets deleted due to the View/Doc getting closed:
The assumption, that parent() of a KateDynamicAnimation is either a KateView
or a KateDocument fails when the animation gets deleted due to the View/Doc
getting closed:

At that point, the dtor of DynAnim is called by e.g. QWidget (View) or
QObject (Doc), and the dynamic cast on parent() will return either of those,
but document() and view() will return 0.

Hence add a check to prevent a crash.

svn path=/trunk/KDE/kdelibs/kate/; revision=1037184

hlamer/kate,DickJ/kate,jfmcarreira/kate,DickJ/kate,hlamer/kate,hlamer/kate,hlamer/kate,sandsmark/kate,cmacq2/kate,hlamer/kate,jfmcarreira/kate,hlamer/kate,sandsmark/kate,DickJ/kate,hlamer/kate,jfmcarreira/kate,hlamer/kate,hlamer/kate,sandsmark/kate,cmacq2/kate,sandsmark/kate,cmacq2/kate,hlamer/kate,DickJ/kate