]> git.sesse.net Git - casparcg/commitdiff
Fixed null pointer reference in executor
authorHelge Norberg <helge.norberg@svt.se>
Tue, 27 Sep 2016 15:43:25 +0000 (17:43 +0200)
committerHelge Norberg <helge.norberg@svt.se>
Tue, 27 Sep 2016 15:43:25 +0000 (17:43 +0200)
common/executor.h

index 805c1bc9dbe6d080fbd7a418d0cd29dd34fb65a6..e67a0afa708e8adb04a458ea2382efe52a158c3a 100644 (file)
@@ -257,7 +257,14 @@ private:
                        catch (const caspar_exception& e)
                        {
                                if (!is_current()) // Add context information from this thread before rethrowing.
-                                       e << context_info(get_context() + *boost::get_error_info<context_info_t>(e));
+                               {
+                                       auto ctx_info = boost::get_error_info<context_info_t>(e);
+
+                                       if (ctx_info)
+                                               e << context_info(get_context() + *ctx_info);
+                                       else
+                                               e << context_info(get_context());
+                               }
 
                                throw;
                        }