mirror of
https://github.com/Palakis/obs-websocket.git
synced 2024-08-30 18:12:16 +00:00
Requests: Check for last scene in RemoveScene
This commit is contained in:
parent
8a45560297
commit
9a8587d6df
@ -95,6 +95,9 @@ RequestResult RequestHandler::RemoveScene(const Request& request)
|
||||
if (!scene)
|
||||
return RequestResult::Error(statusCode, comment);
|
||||
|
||||
if (Utils::Obs::NumberHelper::GetSceneCount() < 2)
|
||||
return RequestResult::Error(RequestStatus::NotEnoughResources, "You cannot remove the last scene in the collection.");
|
||||
|
||||
obs_source_remove(scene);
|
||||
|
||||
return RequestResult::Success();
|
||||
|
Loading…
Reference in New Issue
Block a user