From a05e928a75ab34f58e11395b0bb3d7681b69b849 Mon Sep 17 00:00:00 2001 From: rdb Date: Wed, 17 Oct 2018 19:44:39 +0200 Subject: [PATCH] chan: fix crash in certain cases after AnimControl destruction --- panda/src/chan/partBundle.cxx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/panda/src/chan/partBundle.cxx b/panda/src/chan/partBundle.cxx index 966987995a..cd9fe3f5ce 100644 --- a/panda/src/chan/partBundle.cxx +++ b/panda/src/chan/partBundle.cxx @@ -558,6 +558,12 @@ control_removed(AnimControl *control) { if (cbi != cdata->_blend.end()) { cdata->_blend.erase(cbi); cdata->_anim_changed = true; + + // We need to make sure that any _effective_channel pointers that point + // to this control are cleared. + if (pipeline_stage == 0) { + determine_effective_channels(cdata); + } } } CLOSE_ITERATE_ALL_STAGES(_cycler);