From 9ae714661be994c4627a8b6073f7cf9caf3727f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jens=20B=C3=A4ckman?= Date: Tue, 6 Apr 2010 14:23:17 +0200 Subject: [PATCH] Fix a rare crash with oddly formatted source files --- lib/checkmemoryleak.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/checkmemoryleak.cpp b/lib/checkmemoryleak.cpp index cd63589e6..119a755d8 100644 --- a/lib/checkmemoryleak.cpp +++ b/lib/checkmemoryleak.cpp @@ -965,7 +965,9 @@ Token *CheckMemoryLeakInFunction::getcode(const Token *tok, std::listnext()->link(); + tok = tok->next(); + if (tok->link()) + tok = tok->link(); } } }