Skip to content

Commit

Permalink
fix: Remove memory leak from constructor GameControllerTrigger
Browse files Browse the repository at this point in the history
  • Loading branch information
pktiuk committed Sep 10, 2021
1 parent 710d87c commit 57af281
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/gamecontroller/gamecontrollertrigger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ const GameControllerTrigger::ThrottleTypes GameControllerTrigger::DEFAULTTHROTTL
GameControllerTrigger::GameControllerTrigger(int index, int originset, SetJoystick *parentSet, QObject *parent)
: JoyAxis(index, originset, parentSet, parent)
{
naxisbutton->deleteLater();
naxisbutton = new GameControllerTriggerButton(this, 0, originset, parentSet, this);
paxisbutton->deleteLater();
paxisbutton = new GameControllerTriggerButton(this, 1, originset, parentSet, this);
reset(index);
}
Expand Down

0 comments on commit 57af281

Please sign in to comment.