--- ./kate/view/kateviewinternal.cpp	2009/10/03 01:53:05	1030701
+++ ./kate/view/kateviewinternal.cpp.old	2009/10/03 18:08:14	1031007
@@ -3537,8 +3537,11 @@
   // it deletes itself
   //delete anim;
 
-  // The animation object does this on deletion
-  // renderer()->dynamicRegion().removeRange(range);
+  // The animation object does this on deletion as well,
+  // but since the range could be deleted right after this
+  // and the animation takes some time, make sure
+  // we don't keep a dangling pointer.
+  renderer()->dynamicRegion().removeRange(range);
 }
 
 void KateViewInternal::updateRange(KateSmartRange* range)
