diff --git a/repos/base/include/base/attached_rom_dataspace.h b/repos/base/include/base/attached_rom_dataspace.h index ffa51a844..7830976c5 100644 --- a/repos/base/include/base/attached_rom_dataspace.h +++ b/repos/base/include/base/attached_rom_dataspace.h @@ -85,7 +85,7 @@ class Genode::Attached_rom_dataspace template T const *local_addr() const { return _ds->local_addr(); } - size_t size() const { return _ds->size(); } + size_t size() const { return _ds.constructed() ? _ds->size() : 0; } /** * Register signal handler for ROM module changes