requesthandler: Allow empty object in Set*PrivateSettings requests

Requested by #958

Closes #958
This commit is contained in:
tt2468 2022-07-25 08:21:57 -07:00
parent b0167e6296
commit ecde83a28d
2 changed files with 2 additions and 2 deletions

View File

@ -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);

View File

@ -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);