From 2f54bf5bca2e151bb2d7c08268c8ceb4de688466 Mon Sep 17 00:00:00 2001 From: bubnikv Date: Wed, 29 Nov 2017 20:38:19 +0100 Subject: [PATCH] Fixed a random crash in the PlaceholderParser due to deallocating an undefined pointer. --- xs/src/libslic3r/PlaceholderParser.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/xs/src/libslic3r/PlaceholderParser.cpp b/xs/src/libslic3r/PlaceholderParser.cpp index 07f07c161f..060252387b 100644 --- a/xs/src/libslic3r/PlaceholderParser.cpp +++ b/xs/src/libslic3r/PlaceholderParser.cpp @@ -145,7 +145,7 @@ namespace client template struct expr { - expr() { this->reset(); } + expr() : type(TYPE_EMPTY) {} explicit expr(bool b) : type(TYPE_BOOL) { data.b = b; } explicit expr(bool b, const Iterator &it_begin, const Iterator &it_end) : type(TYPE_BOOL), it_range(it_begin, it_end) { data.b = b; } explicit expr(int i) : type(TYPE_INT) { data.i = i; } @@ -188,7 +188,6 @@ namespace client { if (this->type == TYPE_STRING) delete data.s; - memset(data.raw, 0, sizeof(data.raw)); this->type = TYPE_EMPTY; }