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

UI: Use weak_source_expired instead of getting the source #10647

Merged
merged 1 commit into from
May 10, 2024

Conversation

gxalpha
Copy link
Member

@gxalpha gxalpha commented May 6, 2024

Description

Changes an action that's getting a source from the weak source to check if the source still exists to simply use obs_weak_source_expired.

Motivation and Context

Noticed this, and appears to be unnecessary.

How Has This Been Tested?

macOS 14.4.1
Copied filters from a source.
Right clicked on the audio mixer to see that "Paste Filters" is available.
Deleted the source. Right clicked on the audio mixer again and "Paste Filters" is unavailable.

Types of changes

  • Code cleanup (non-breaking change which makes code smaller or more readable)

Checklist:

  • My code has been run through clang-format.
  • I have read the contributing document.
  • My code is not on the master branch.
  • The code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.

@gxalpha gxalpha added the Code Cleanup Non-breaking change which makes code smaller or more readable label May 6, 2024
@RytoEX RytoEX self-assigned this May 9, 2024
Copy link
Member

@RytoEX RytoEX left a comment

Choose a reason for hiding this comment

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

Tested this locally and it seems fine. A second look would be appreciated, but I may not require it.

This code pattern is also used elsewhere.
52497d2

@RytoEX RytoEX added this to the OBS Studio (Next Version) milestone May 10, 2024
@RytoEX RytoEX merged commit 79f680c into obsproject:master May 10, 2024
14 checks passed
@gxalpha gxalpha deleted the weak-source-expired-cleanup branch May 11, 2024 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code Cleanup Non-breaking change which makes code smaller or more readable
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants