frontend: Fix a crash when user cancels to save changes in settings#13369
Open
suogesi wants to merge 1 commit intoobsproject:masterfrom
Open
frontend: Fix a crash when user cancels to save changes in settings#13369suogesi wants to merge 1 commit intoobsproject:masterfrom
suogesi wants to merge 1 commit intoobsproject:masterfrom
Conversation
PatTheMav
reviewed
Apr 28, 2026
Member
PatTheMav
left a comment
There was a problem hiding this comment.
There seem to be multiple instances in the settings window implementation where code has to dance carefully around the "editable" state of the resolution comboboxes.
The code usually explicitly calls isEditable to figure out whether it might potentially yield text widget before accessing it. So I guess it would be more canonical to use the same approach here.
Author
|
It makes sense. Now OBS will gently ask if output resolution can be edited. |
PatTheMav
reviewed
Apr 29, 2026
`outputResolution` may not be editable and outputResolution->lineEdit() can return `nullptr` which causes crash.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Settings > Video > Output (Scaled) Resolution is a
QComboBox, which has a dropdown and may be editable or not. If some settings make it not editable meanwhile change its value, when user tries to close settings window and select "No". OBS always tries to write preview value back, even if it is not editable now. This will cause a crush.This PR adds a check of
nullptrso it won't cause a crush anymore.Motivation and Context
#13367
How Has This Been Tested?
Types of changes
Checklist: