From 196370f186778e149c0002b73249750e530c8dc7 Mon Sep 17 00:00:00 2001 From: Yunsup Lee Date: Wed, 16 Oct 2013 14:26:13 -0700 Subject: [PATCH] fix missing null check when there's no extension --- riscv/processor.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/riscv/processor.cc b/riscv/processor.cc index 652a170..77a81b3 100644 --- a/riscv/processor.cc +++ b/riscv/processor.cc @@ -66,7 +66,8 @@ void processor_t::reset(bool value) run = !value; state.reset(); // reset the core - ext->reset(); // reset the extension + if (ext) + ext->reset(); // reset the extension } uint32_t processor_t::set_fsr(uint32_t val) -- 2.30.2