mirror of
https://github.com/Palakis/obs-websocket.git
synced 2024-08-30 18:12:16 +00:00
requesthandler: Allow empty object in Set*PrivateSettings requests
Requested by #958 Closes #958
This commit is contained in:
parent
b0167e6296
commit
ecde83a28d
@ -759,7 +759,7 @@ RequestResult RequestHandler::SetSceneItemPrivateSettings(const Request &request
|
||||
std::string comment;
|
||||
OBSSceneItemAutoRelease sceneItem = request.ValidateSceneItem("sceneName", "sceneItemId", statusCode, comment,
|
||||
OBS_WEBSOCKET_SCENE_FILTER_SCENE_OR_GROUP);
|
||||
if (!sceneItem || !request.ValidateObject("sceneItemSettings", statusCode, comment))
|
||||
if (!sceneItem || !request.ValidateObject("sceneItemSettings", statusCode, comment, true))
|
||||
return RequestResult::Error(statusCode, comment);
|
||||
|
||||
OBSDataAutoRelease privateSettings = obs_sceneitem_get_private_settings(sceneItem);
|
||||
|
@ -339,7 +339,7 @@ RequestResult RequestHandler::SetSourcePrivateSettings(const Request &request)
|
||||
RequestStatus::RequestStatus statusCode;
|
||||
std::string comment;
|
||||
OBSSourceAutoRelease source = request.ValidateSource("sourceName", statusCode, comment);
|
||||
if (!source || !request.ValidateObject("sourceSettings", statusCode, comment))
|
||||
if (!source || !request.ValidateObject("sourceSettings", statusCode, comment, true))
|
||||
return RequestResult::Error(statusCode, comment);
|
||||
|
||||
OBSDataAutoRelease privateSettings = obs_source_get_private_settings(source);
|
||||
|
Loading…
Reference in New Issue
Block a user