Skip to content

Commit

Permalink
Fixed crash when deleting node
Browse files Browse the repository at this point in the history
  • Loading branch information
Fattorino committed Mar 8, 2024
1 parent 5cab35f commit 8fee461
Show file tree
Hide file tree
Showing 3 changed files with 94 additions and 114 deletions.
7 changes: 6 additions & 1 deletion include/ImNodeFlow.h
Original file line number Diff line number Diff line change
Expand Up @@ -756,7 +756,12 @@ namespace ImFlow
/**
* @brief <BR>Delete itself
*/
void destroy() { m_destroyed = true; m_inf->getNodes().erase(m_uid); }
void destroy() { m_destroyed = true; }

/*
* @brief <BR>Get if node must be deleted
*/
[[nodiscard]] bool toDestroy() const { return m_destroyed; }

/**
* @brief <BR>Get hovered status
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Create your custom nodes and their logic... ImNodeFlow will handle connections,
include(FetchContent)
FetchContent_Declare(ImNodeFlow
GIT_REPOSITORY "https://github.com/Fattorino/ImNodeFlow.git"
GIT_TAG "v1.2.0"
GIT_TAG "v1.2.1"
SOURCE_DIR "${CMAKE_CURRENT_LIST_DIR}/includes/ImNodeFlow"
)
FetchContent_MakeAvailable(ImNodeFlow)
Expand Down
Loading

0 comments on commit 8fee461

Please sign in to comment.