diff --git a/src/events.cpp b/src/events.cpp index 2aac848a6..eafefb09e 100755 --- a/src/events.cpp +++ b/src/events.cpp @@ -1264,7 +1264,8 @@ void DStaticEventHandler::NewGame() // void DStaticEventHandler::OnDestroy() { - owner->UnregisterHandler(this); + if (owner) + owner->UnregisterHandler(this); Super::OnDestroy(); } diff --git a/src/r_data/r_interpolate.cpp b/src/r_data/r_interpolate.cpp index 6517eb283..ed9c7f58a 100644 --- a/src/r_data/r_interpolate.cpp +++ b/src/r_data/r_interpolate.cpp @@ -355,7 +355,8 @@ int DInterpolation::DelRef(bool force) void DInterpolation::UnlinkFromMap() { - Level->interpolator.RemoveInterpolation(this); + if (Level) + Level->interpolator.RemoveInterpolation(this); refcount = 0; }