From 7b6fab68aba67458d871d03ac925611fba4cd90f Mon Sep 17 00:00:00 2001 From: Dragos Carp Date: Sun, 12 Aug 2018 00:03:48 +0300 Subject: [PATCH] Fix #6 Don't crash when protoc do not specify its own version. --- protoc_gen_d/protoc-gen-d.d | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protoc_gen_d/protoc-gen-d.d b/protoc_gen_d/protoc-gen-d.d index 2144e84..d93577c 100644 --- a/protoc_gen_d/protoc-gen-d.d +++ b/protoc_gen_d/protoc-gen-d.d @@ -43,7 +43,7 @@ class CodeGenerator import std.conv : to; import std.format : format; - with (request.compilerVersion) + if (request.compilerVersion) with (request.compilerVersion) protocVersion = format!"%d%03d%03d"(major, minor, patch); collectedMessageTypes.clear;