mirror of
https://github.com/Palakis/obs-websocket.git
synced 2024-08-30 18:12:16 +00:00
Added missing return statements to ToggleMute and SetMute handlers
This commit is contained in:
@ -401,6 +401,7 @@ void WSRequestHandler::ToggleMute(WSRequestHandler *owner) {
|
||||
obs_source_t* item = obs_get_source_by_name(item_name);
|
||||
if (!item) {
|
||||
owner->SendErrorResponse("invalid request parameters");
|
||||
return;
|
||||
}
|
||||
|
||||
obs_source_set_muted(item, !obs_source_muted(item));
|
||||
@ -420,6 +421,7 @@ void WSRequestHandler::SetMute(WSRequestHandler *owner) {
|
||||
obs_source_t* item = obs_get_source_by_name(item_name);
|
||||
if (!item) {
|
||||
owner->SendErrorResponse("specified source doesn't exist");
|
||||
return;
|
||||
}
|
||||
|
||||
obs_source_set_muted(item, mute);
|
||||
|
Reference in New Issue
Block a user