diff --git a/WSRequestHandler.cpp b/WSRequestHandler.cpp index 86df51f7..48df3a45 100644 --- a/WSRequestHandler.cpp +++ b/WSRequestHandler.cpp @@ -722,8 +722,8 @@ void WSRequestHandler::HandleSetSyncOffset(WSRequestHandler* req) { const char* source_name = obs_data_get_string(req->data, "source"); int64_t source_sync_offset = (int64_t)obs_data_get_int(req->data, "offset"); - if (source_name == NULL || strlen(source_name) < 1 || - source_sync_offset < 0 { + if (!source_name || strlen(source_name) < 1 || + source_sync_offset < 0) { req->SendErrorResponse("invalid request parameters"); return; }