From 712bd6e8f38e3c1208bc19a98827cbc294e2f8cd Mon Sep 17 00:00:00 2001 From: Marwin M Date: Mon, 7 Aug 2017 15:34:43 +0200 Subject: [PATCH] Fix if statement Add missing closing bracket and use !source_name instead of source_name == NULL --- WSRequestHandler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; }