aboutsummaryrefslogtreecommitdiff
path: root/memory.c
diff options
context:
space:
mode:
Diffstat (limited to 'memory.c')
-rw-r--r--memory.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/memory.c b/memory.c
index 59ecc28401..3f1df238e2 100644
--- a/memory.c
+++ b/memory.c
@@ -1562,7 +1562,7 @@ static FlatRange *flatview_lookup(FlatView *view, AddrRange addr)
bool memory_region_present(MemoryRegion *parent, hwaddr addr)
{
MemoryRegion *mr = memory_region_find(parent, addr, 1).mr;
- if (!mr) {
+ if (!mr || (mr == parent)) {
return false;
}
memory_region_unref(mr);