fix missing null check when there's no extension
authorYunsup Lee <yunsup@cs.berkeley.edu>
Wed, 16 Oct 2013 21:26:13 +0000 (14:26 -0700)
committerYunsup Lee <yunsup@cs.berkeley.edu>
Wed, 16 Oct 2013 21:26:13 +0000 (14:26 -0700)
riscv/processor.cc

index 652a17033aad9d78a2c748f87760ac841ba0f402..77a81b3cce66c625cc0f225e119d09159a095b2c 100644 (file)
@@ -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)