clipboard: check validity of import rom before usage

The attached ROM dataspace may be not yet valid on the first update (or
at any time beyond this explicit test case).
This commit is contained in:
Christian Helmuth 2015-11-24 14:15:48 +01:00
parent e13971fcf0
commit d46ad98434
1 changed files with 4 additions and 0 deletions

View File

@ -114,6 +114,10 @@ class Subsystem
PLOG("\n%s: import new content:", _name.string());
_import_rom.update();
if (!_import_rom.is_valid())
return;
_import_content = _import_rom.local_addr<char>();
_log_lines(_import_content, _import_rom.size());