From a5e43b4be51a9c918cd0eb7b1a4e852f65eb46b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sun, 6 Dec 2009 09:02:13 +0100 Subject: [PATCH] Fixed #1051 (segmentation fault when there is syntax error) --- lib/tokenize.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/tokenize.cpp b/lib/tokenize.cpp index 133fd0b37..6b08fbfdd 100644 --- a/lib/tokenize.cpp +++ b/lib/tokenize.cpp @@ -4616,6 +4616,8 @@ void Tokenizer::simplifyComma() startFrom->previous()->deleteThis(); tok = endAt; + if (!tok) + return; } }