aboutsummaryrefslogtreecommitdiff
path: root/target/sparc/monitor.c
diff options
context:
space:
mode:
Diffstat (limited to 'target/sparc/monitor.c')
-rw-r--r--target/sparc/monitor.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/target/sparc/monitor.c b/target/sparc/monitor.c
index 7cc1b0f87f..f3ca524ae9 100644
--- a/target/sparc/monitor.c
+++ b/target/sparc/monitor.c
@@ -32,6 +32,10 @@ void hmp_info_tlb(Monitor *mon, const QDict *qdict)
{
CPUArchState *env1 = mon_get_cpu_env();
+ if (!env1) {
+ monitor_printf(mon, "No CPU available\n");
+ return;
+ }
dump_mmu((FILE*)mon, (fprintf_function)monitor_printf, env1);
}