From c5650e4e46326c117c27c9e84bb3b6b68ddbb2b6 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Sun, 17 Jul 2022 12:42:51 +0200 Subject: [PATCH] savemem:: do not crash because of flashdata not cleared --- graph.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/graph.cpp b/graph.cpp index ae91dc8a..f4f77a69 100644 --- a/graph.cpp +++ b/graph.cpp @@ -4285,6 +4285,10 @@ struct flashdata { vector flashes; +auto ahgf = addHook(hooks_removecells, 1, [] () { + eliminate_if(flashes, [] (flashdata& f) { return is_cell_removed(f.where); }); + }); + EX void drawBubble(cell *c, color_t col, string s, ld size) { LATE( drawBubble(c, col, s, size); ) auto fd = flashdata(ticks, 1000, c, col, 0);