Null check macOS window handle before detaching view #374
No reviewers
Labels
No labels
area/accessibility
area/dependency
Confirmed
Crash Report
Delayed
Design Issue
Duplicate
Feedback required
Good first issue
kind/bug
kind/cleanup
kind/enhancement
platform/linux
platform/macos
platform/windows
priority/high
Question
Request for Comments
Seeking Other Contributors
Seeking Testers
Won't Fix / By Design
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-obsproject/obs-browser!374
Loading…
Reference in a new issue
No description provided.
Delete branch "hack-the-hack"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
Fixes a crash with service integrations.
What the original code does is decoupling the browser from the widget (more explanation is in the comment a few lines above the modified). For some reason however, on Qt 6 the window handle can be null sometimes. In that case, trying to detach the view from the view from the superview fails (obviously).
By the way, the code looks cursed for two reasons:
Motivation and Context
Don't want crashes.
How Has This Been Tested?
macOS 13.
No more crashes with Twitch integration.
Types of changes
Checklist:
Conceptually this matches the
if (hwnd) {on Windows, so it looks good to me.Also we can save untangling the code for post-28 in my opinion.