Fixed a random crash in the PlaceholderParser due to deallocating
an undefined pointer.
This commit is contained in:
parent
f754cb422b
commit
2f54bf5bca
1 changed files with 1 additions and 2 deletions
|
@ -145,7 +145,7 @@ namespace client
|
||||||
template<typename Iterator>
|
template<typename Iterator>
|
||||||
struct expr
|
struct expr
|
||||||
{
|
{
|
||||||
expr() { this->reset(); }
|
expr() : type(TYPE_EMPTY) {}
|
||||||
explicit expr(bool b) : type(TYPE_BOOL) { data.b = b; }
|
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(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; }
|
explicit expr(int i) : type(TYPE_INT) { data.i = i; }
|
||||||
|
@ -188,7 +188,6 @@ namespace client
|
||||||
{
|
{
|
||||||
if (this->type == TYPE_STRING)
|
if (this->type == TYPE_STRING)
|
||||||
delete data.s;
|
delete data.s;
|
||||||
memset(data.raw, 0, sizeof(data.raw));
|
|
||||||
this->type = TYPE_EMPTY;
|
this->type = TYPE_EMPTY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue