From d55430fc4e9c0204c74f463d5e427cfe081fcad9 Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Thu, 4 Oct 2012 10:20:58 +0200 Subject: [PATCH] PetScan::mark_write: handle NULL access Although mark_write is currently only called with a non-NULL argument, we may want to call it with a possibly NULL argument in later commits. Signed-off-by: Sven Verdoolaege --- scan.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scan.cc b/scan.cc index 89a856f..d4f8aa9 100644 --- a/scan.cc +++ b/scan.cc @@ -1366,6 +1366,9 @@ void PetScan::mark_write(struct pet_expr *access) isl_id *id; ValueDecl *decl; + if (!access) + return; + access->acc.write = 1; access->acc.read = 0; -- 2.11.4.GIT