Skip to content

Commit 8fee461

Browse files
committed
Fixed crash when deleting node
1 parent 5cab35f commit 8fee461

File tree

3 files changed

+94
-114
lines changed

3 files changed

+94
-114
lines changed

include/ImNodeFlow.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -756,7 +756,12 @@ namespace ImFlow
756756
/**
757757
* @brief <BR>Delete itself
758758
*/
759-
void destroy() { m_destroyed = true; m_inf->getNodes().erase(m_uid); }
759+
void destroy() { m_destroyed = true; }
760+
761+
/*
762+
* @brief <BR>Get if node must be deleted
763+
*/
764+
[[nodiscard]] bool toDestroy() const { return m_destroyed; }
760765

761766
/**
762767
* @brief <BR>Get hovered status

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Create your custom nodes and their logic... ImNodeFlow will handle connections,
2020
include(FetchContent)
2121
FetchContent_Declare(ImNodeFlow
2222
GIT_REPOSITORY "https://github.com/Fattorino/ImNodeFlow.git"
23-
GIT_TAG "v1.2.0"
23+
GIT_TAG "v1.2.1"
2424
SOURCE_DIR "${CMAKE_CURRENT_LIST_DIR}/includes/ImNodeFlow"
2525
)
2626
FetchContent_MakeAvailable(ImNodeFlow)

0 commit comments

Comments
 (0)