Skip to content

Commit

Permalink
DolphinQt: non-Windows builds leak in InterfacePane
Browse files Browse the repository at this point in the history
The m_checkbox_lock_mouse QCheckBox was only conditionally being added
to the layout, leaving it unmanaged and leaking

Setting the parent will allow it to be managed.
  • Loading branch information
mackal committed Apr 4, 2023
1 parent e511718 commit 7dde0c3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Source/Core/DolphinQt/Settings/InterfacePane.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,8 @@ void InterfacePane::CreateInGame()
m_vboxlayout_hide_mouse->addWidget(m_radio_cursor_visible_never);
m_vboxlayout_hide_mouse->addWidget(m_radio_cursor_visible_always);

m_checkbox_lock_mouse = new QCheckBox(tr("Lock Mouse Cursor"));
// this ends up not being managed unless _WIN32, so lets not leak
m_checkbox_lock_mouse = new QCheckBox(tr("Lock Mouse Cursor"), this);
m_checkbox_lock_mouse->setToolTip(tr("Will lock the Mouse Cursor to the Render Widget as long as "
"it has focus. You can set a hotkey to unlock it."));

Expand Down

0 comments on commit 7dde0c3

Please sign in to comment.