Skip to content

Commit 5dda4af

Browse files
authored
Move deletion of topicTree to after use of the pointer in removePre/PostHandler (#1782)
This fails clang-tidy and is probably a reasonable thing to change
1 parent 388e2b3 commit 5dda4af

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/App.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,12 +189,12 @@ struct TemplatedApp {
189189

190190
/* Delete TopicTree */
191191
if (topicTree) {
192-
delete topicTree;
193-
194192
/* And unregister loop callbacks */
195193
/* We must unregister any loop post handler here */
196194
Loop::get()->removePostHandler(topicTree);
197195
Loop::get()->removePreHandler(topicTree);
196+
197+
delete topicTree;
198198
}
199199
}
200200

0 commit comments

Comments
 (0)