From 2a363e453a8ed7e1d19682d889c3a62e9e71a7d2 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 17 Oct 2013 16:34:06 +0300 Subject: dont call setMap from destructors. --- src/being/actor.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/being/actor.cpp') diff --git a/src/being/actor.cpp b/src/being/actor.cpp index f32105682..62ab4fc83 100644 --- a/src/being/actor.cpp +++ b/src/being/actor.cpp @@ -35,7 +35,11 @@ Actor::Actor(): Actor::~Actor() { - setMap(nullptr); + if (mMap) + { + mMap->removeActor(mMapActor); + mMap = nullptr; + } } void Actor::setMap(Map *const map) -- cgit v1.2.3-70-g09d2