From 557e539fadd44fc7198f9eb132e723bd4f2fc195 Mon Sep 17 00:00:00 2001 From: Pedro Pinto Date: Mon, 2 Apr 2018 13:52:36 -0400 Subject: [PATCH] SPARK-678, 0 sized stream updates were being swallowed by the API. --- src/lib/api/core/ApiClientInterop.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lib/api/core/ApiClientInterop.cpp b/src/lib/api/core/ApiClientInterop.cpp index 2526bcf1a..e905114a2 100644 --- a/src/lib/api/core/ApiClientInterop.cpp +++ b/src/lib/api/core/ApiClientInterop.cpp @@ -173,9 +173,10 @@ CAPI bool api_client_is_on_qb_thread(ApiClient* pclient) { void safe_call_subscription_callback(raw_subscription_callback cb, EventType type, const std::vector& updates, void* extra) { safe_call_fn([&]() { - if (updates.size() > 0) { + if (updates.size() > 0) cb(type, &updates[0], updates.size(), extra); - } + else + cb(type, nullptr, updates.size(), extra); }); }