UI: Add null checks before doing some API calls

Harmless, but generated a debug warning for null pointers passed into
the API.
This commit is contained in:
Richard Stanway
2024-06-08 17:44:29 +02:00
committed by Ryan Foster
parent 51e3bd5e3d
commit f9f4171d56
3 changed files with 4 additions and 3 deletions

View File

@@ -8639,7 +8639,7 @@ void OBSBasic::UpdateEditMenu()
const bool canTransformSingle = videoCount == 1 && totalCount == 1;
OBSSceneItem curItem = GetCurrentSceneItem();
bool locked = obs_sceneitem_locked(curItem);
bool locked = curItem && obs_sceneitem_locked(curItem);
ui->actionCopySource->setEnabled(totalCount > 0);
ui->actionEditTransform->setEnabled(canTransformSingle && !locked);