Skip to content

Commit

Permalink
Gui: Fix memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed May 16, 2024
1 parent cf57d0a commit 190b5e1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Gui/Action.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -627,9 +627,10 @@ WorkbenchGroup::WorkbenchGroup ( Command* pcCmd, QObject * parent )
this, &WorkbenchGroup::onWorkbenchActivated);
}

QAction* WorkbenchGroup::getOrCreateAction(const QString& wbName) {
QAction* WorkbenchGroup::getOrCreateAction(const QString& wbName)
{
if (!actionByWorkbenchName.contains(wbName)) {
actionByWorkbenchName[wbName] = new QAction;
actionByWorkbenchName[wbName] = new QAction(QApplication::instance());
}

return actionByWorkbenchName[wbName];
Expand Down

0 comments on commit 190b5e1

Please sign in to comment.