Skip to content

Commit 5b656ce

Browse files
committed
Fixed potential segfault in variable definition stats logging
1 parent 9d30b47 commit 5b656ce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stats.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -722,7 +722,7 @@ void stats_log_stack_pop(struct ParseState *parser, struct Value *Var)
722722

723723
void stats_log_variable_definition(struct ParseState *parser, char *Ident, struct ValueType *Typ, int IsGlobal)
724724
{
725-
if (parser->pc->CollectStats && Typ) {
725+
if (parser && parser->pc->CollectStats && Typ) {
726726
int Size = Typ->Sizeof;
727727

728728
if (IsGlobal) {

0 commit comments

Comments
 (0)