Skip to content

Commit

Permalink
Move deletion of topicTree to after use of the pointer in removePre/P…
Browse files Browse the repository at this point in the history
…ostHandler

This fails clang-tidy and is probably a reasonable thing to change
  • Loading branch information
glingy authored Sep 18, 2024
1 parent 388e2b3 commit 8e1fed2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/App.h
Original file line number Diff line number Diff line change
Expand Up @@ -189,12 +189,12 @@ struct TemplatedApp {

/* Delete TopicTree */
if (topicTree) {
delete topicTree;

/* And unregister loop callbacks */
/* We must unregister any loop post handler here */
Loop::get()->removePostHandler(topicTree);
Loop::get()->removePreHandler(topicTree);

delete topicTree;
}
}

Expand Down

0 comments on commit 8e1fed2

Please sign in to comment.