Skip to content

Commit

Permalink
UI: Use weak_source_expired instead of getting the source
Browse files Browse the repository at this point in the history
  • Loading branch information
gxalpha authored and RytoEX committed May 10, 2024
1 parent c974a40 commit 79f680c
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions UI/window-basic-main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3833,14 +3833,8 @@ void OBSBasic::VolControlContextMenu()

copyFiltersAction.setEnabled(obs_source_filter_count(vol->GetSource()) >
0);

OBSSourceAutoRelease source =
obs_weak_source_get_source(copyFiltersSource);
if (source) {
pasteFiltersAction.setEnabled(true);
} else {
pasteFiltersAction.setEnabled(false);
}
pasteFiltersAction.setEnabled(
!obs_weak_source_expired(copyFiltersSource));

QMenu popup;
vol->SetContextMenu(&popup);
Expand Down

0 comments on commit 79f680c

Please sign in to comment.