Skip to content
Permalink
Browse files

Fix crash when searching in element search ui

  • Loading branch information...
jacob1 committed Apr 18, 2019
1 parent e1d32c9 commit 711453ad654806f3cb0deaaa578c915cbb4eaf8d
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/gui/elementsearch/ElementSearchActivity.cpp
@@ -95,9 +95,9 @@ ElementSearchActivity::ElementSearchActivity(GameController * gameController, st
void ElementSearchActivity::searchTools(String query)
{
firstResult = NULL;
for(std::vector<ToolButton*>::iterator iter = toolButtons.begin(), end = toolButtons.end(); iter != end; ++iter) {
delete *iter;
RemoveComponent(*iter);
for (auto &toolButton : toolButtons) {
RemoveComponent(toolButton);
delete toolButton;
}
toolButtons.clear();

0 comments on commit 711453a

Please sign in to comment.
You can’t perform that action at this time.