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 15:25:04 -04:00
committed by Ryan Foster
parent 51e3bd5e3d
commit f9f4171d56
3 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -654,7 +654,7 @@ void OBSBasicPreview::mousePressEvent(QMouseEvent *event)
void OBSBasicPreview::UpdateCursor(uint32_t &flags)
{
if (obs_sceneitem_locked(stretchItem)) {
if (!stretchItem || obs_sceneitem_locked(stretchItem)) {
unsetCursor();
return;
}