From 009cbb34025d4c48b4cb45ff669c7a31a283d9e9 Mon Sep 17 00:00:00 2001 From: Simon Fels Date: Mon, 19 Dec 2016 08:00:16 +0100 Subject: [PATCH] Don't stop SDL event processing thread when it is not running --- src/anbox/ubuntu/platform_policy.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/anbox/ubuntu/platform_policy.cpp b/src/anbox/ubuntu/platform_policy.cpp index df0fcfa..b065fce 100644 --- a/src/anbox/ubuntu/platform_policy.cpp +++ b/src/anbox/ubuntu/platform_policy.cpp @@ -73,8 +73,10 @@ PlatformPolicy::PlatformPolicy( } PlatformPolicy::~PlatformPolicy() { - event_thread_running_ = false; - event_thread_.join(); + if (event_thread_running_) { + event_thread_running_ = false; + event_thread_.join(); + } } void PlatformPolicy::process_events() {