diff options
| author | Rusty Wagner <rusty.wagner@gmail.com> | 2023-01-31 21:45:23 -0500 |
|---|---|---|
| committer | Alexander Taylor <alex@vector35.com> | 2023-02-08 11:53:38 -0500 |
| commit | c2247a35e97c96eba9cd4caf09b32b038625cc31 (patch) | |
| tree | d88022f286bd811667f88cc3926dada7b4ec5d31 /flowgraph.cpp | |
| parent | 0b752f36c9d3b6bcb51a05fdcf5b38633d38bdbd (diff) | |
Clean up possible early deletion issues in API callbacks
Diffstat (limited to 'flowgraph.cpp')
| -rw-r--r-- | flowgraph.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/flowgraph.cpp b/flowgraph.cpp index b812e57d..66e8eb7f 100644 --- a/flowgraph.cpp +++ b/flowgraph.cpp @@ -94,28 +94,28 @@ FlowGraph::FlowGraph(BNFlowGraph* graph) void FlowGraph::PrepareForLayoutCallback(void* ctxt) { - FlowGraph* graph = (FlowGraph*)ctxt; + CallbackRef<FlowGraph> graph(ctxt); graph->PrepareForLayout(); } void FlowGraph::PopulateNodesCallback(void* ctxt) { - FlowGraph* graph = (FlowGraph*)ctxt; + CallbackRef<FlowGraph> graph(ctxt); graph->PopulateNodes(); } void FlowGraph::CompleteLayoutCallback(void* ctxt) { - FlowGraph* graph = (FlowGraph*)ctxt; + CallbackRef<FlowGraph> graph(ctxt); graph->CompleteLayout(); } BNFlowGraph* FlowGraph::UpdateCallback(void* ctxt) { - FlowGraph* graph = (FlowGraph*)ctxt; + CallbackRef<FlowGraph> graph(ctxt); Ref<FlowGraph> result = graph->Update(); if (!result) return nullptr; |
