Bugfix: no longer segfault when changing images.

This commit is contained in:
2018-04-12 20:53:15 +02:00
parent 7569b9aad3
commit eb31ce7d18

View File

@@ -222,6 +222,10 @@ void RenderingState::loadSimulationData(const std::map<string, LayerInfo> &info,
void RenderingState::queueUpdate() void RenderingState::queueUpdate()
{ {
// Make sure that visualisations are cleared in the current thread
layerVisualisations.clear();
interactionAnimations.clear();
loadingFuture = std::async(std::launch::async, []() { loadingFuture = std::async(std::launch::async, []() {
RenderingState::instance().updateVisualisers(); RenderingState::instance().updateVisualisers();
}); });