Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DolphinQt/Debugger: Fix crash with floating debugger windows #8618

Merged
merged 1 commit into from Feb 9, 2020

Conversation

encounter
Copy link
Contributor

QDockWidget::setFloating ends up calling showEvent in the implementation class.

In BreakpointWidget and CodeWidget, this leads to Update() and a null pointer dereference on widgets that haven't been created yet. Moving the CreateWidgets call before setFloating fixes this. (JITWidget and MemoryWidget already do this.)

The rest of the widgets that call setFloating have also been updated to avoid similar bugs if they're changed in the future.

@encounter
Copy link
Contributor Author

The crash can be reproduced with a Qt.ini containing:

[breakpointwidget]
floating=true

[codewidget]
floating=true

[debugger]
showbreakpoints=true
showcode=true
showregisters=true

[registerwidget]
floating=true

Copy link
Contributor

@CookiePLMonster CookiePLMonster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Untested, but it makes sense.

@leoetlino leoetlino merged commit aa21fe1 into dolphin-emu:master Feb 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants