From 9e0b5a7821a0179fb55c6fe5b02127722e0d81c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6nke=20Ludwig?= Date: Thu, 21 Sep 2017 14:09:19 +0200 Subject: [PATCH] Fix access violation in the log module when called from a non-D thread. --- source/vibe/core/log.d | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/vibe/core/log.d b/source/vibe/core/log.d index ee78d85..7dfab44 100644 --- a/source/vibe/core/log.d +++ b/source/vibe/core/log.d @@ -834,7 +834,7 @@ private struct LogOutputRange { this.info.level = level; this.info.thread = () @trusted { return Thread.getThis(); }(); // not @safe as of 2.065 this.info.threadID = makeid(this.info.thread); - this.info.threadName = () @trusted { return this.info.thread.name; } (); + this.info.threadName = () @trusted { return this.info.thread ? this.info.thread.name : ""; } (); this.info.fiber = () @trusted { return Fiber.getThis(); }(); // not @safe as of 2.065 this.info.fiberID = makeid(this.info.fiber); } catch (Exception e) {