mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-28 17:48:53 +00:00
Prevent warnings about unconstructed attached ROMs
If attached ROM dataspaces are not valid after update(), code that uses these ROMs produces void Genode::Volatile_object< <template-parameter-1-1> >::_check_constructed() const [with MT = Genode::Attached_dataspace]: Deref_unconstructed_object
This commit is contained in:
parent
146c694513
commit
1f719dee26
@ -70,6 +70,8 @@ struct Wm::Main
|
|||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
focus_rom.update();
|
focus_rom.update();
|
||||||
|
if (!focus_rom.is_valid())
|
||||||
|
return;
|
||||||
|
|
||||||
unsigned long win_id = 0;
|
unsigned long win_id = 0;
|
||||||
|
|
||||||
@ -94,6 +96,8 @@ struct Wm::Main
|
|||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
resize_request_rom.update();
|
resize_request_rom.update();
|
||||||
|
if (!resize_request_rom.is_valid())
|
||||||
|
return;
|
||||||
|
|
||||||
char const * const node_type = "window";
|
char const * const node_type = "window";
|
||||||
|
|
||||||
|
@ -228,6 +228,8 @@ void Main::handle_focus(unsigned)
|
|||||||
{
|
{
|
||||||
/* fetch new content of the focus ROM module */
|
/* fetch new content of the focus ROM module */
|
||||||
focus_ds.update();
|
focus_ds.update();
|
||||||
|
if (!focus_ds.is_valid())
|
||||||
|
return;
|
||||||
|
|
||||||
/* reset status-bar properties */
|
/* reset status-bar properties */
|
||||||
label = Label();
|
label = Label();
|
||||||
|
@ -77,6 +77,8 @@ class Rom_filter::Input_rom_registry
|
|||||||
void _handle_rom_changed(unsigned)
|
void _handle_rom_changed(unsigned)
|
||||||
{
|
{
|
||||||
_rom_ds.update();
|
_rom_ds.update();
|
||||||
|
if (!_rom_ds.is_valid())
|
||||||
|
return;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
_top_level = Xml_node(_rom_ds.local_addr<char>());
|
_top_level = Xml_node(_rom_ds.local_addr<char>());
|
||||||
|
Loading…
Reference in New Issue
Block a user