From 6b47feb7325ec4cbd76d4f974ff68ad2a2f89019 Mon Sep 17 00:00:00 2001 From: tastytea Date: Thu, 17 May 2018 19:09:36 +0200 Subject: [PATCH] fixed example 13 --- examples/example13_easy_stream.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/example13_easy_stream.cpp b/examples/example13_easy_stream.cpp index ca04dda..ac74fe3 100644 --- a/examples/example13_easy_stream.cpp +++ b/examples/example13_easy_stream.cpp @@ -54,12 +54,12 @@ int main(int argc, char *argv[]) { std::this_thread::sleep_for(std::chrono::seconds(1)); // Skip iteration if ptr points not to the Mastodon::API::http object - if (ptr != nullptr) + if (ptr == nullptr) { continue; } - // Acquire lock to for the stream variable + // Acquire lock for the stream variable std::lock_guard lock(ptr->get_mutex()); // Parse event stream and clear it afterwards