From dc64fb716f581ce7062e025783b9dfd21dd89c92 Mon Sep 17 00:00:00 2001 From: Jan Egil Ruud Date: Thu, 1 Dec 2022 20:05:55 +0100 Subject: [PATCH] Fix wrongfully call to initCache() according to stefanrueger's instructions. --- src/avrcache.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/avrcache.c b/src/avrcache.c index a0fa9082..3215d720 100644 --- a/src/avrcache.c +++ b/src/avrcache.c @@ -367,6 +367,9 @@ int avr_flush_cache(const PROGRAMMER *pgm, const AVRPART *p) { AVRMEM *mem = mems[i].mem; AVR_Cache *cp = mems[i].cp; + if(!mem) + continue; + if(!cp->cont) // Ensure cache is initialised from now on if(initCache(cp, pgm, p) < 0) { if(quell_progress)