From cb6b74b269b8ed800698c9fa9975d076c33a7846 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Mon, 9 Dec 2024 14:40:07 +0100 Subject: [PATCH] fix: Use after free when deleting data processor nodes with errors --- .../builtin/source/content/views/view_data_processor.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugins/builtin/source/content/views/view_data_processor.cpp b/plugins/builtin/source/content/views/view_data_processor.cpp index ce505487b..549709be4 100644 --- a/plugins/builtin/source/content/views/view_data_processor.cpp +++ b/plugins/builtin/source/content/views/view_data_processor.cpp @@ -497,6 +497,12 @@ namespace hex::plugin::builtin { return node->getId() == id; }); + if (workspace.currNodeError.has_value()) { + if (workspace.currNodeError->node == node->get()) { + workspace.currNodeError.reset(); + } + } + // Remove the node from the workspace workspace.nodes.erase(node); }