Skip to content

Commit

Permalink
Fixed a random crash in the PlaceholderParser due to deallocating
Browse files Browse the repository at this point in the history
an undefined pointer.
  • Loading branch information
bubnikv committed Nov 29, 2017
1 parent f754cb4 commit 2f54bf5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions xs/src/libslic3r/PlaceholderParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ namespace client
template<typename Iterator>
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; }
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 2f54bf5

Please sign in to comment.