core: don't dereference null pointer

This commit is contained in:
Alexander Boettcher 2012-12-03 14:01:38 +01:00 committed by Norman Feske
parent 9cdf062ee6
commit 96ef2b24c7
1 changed files with 3 additions and 0 deletions

View File

@ -163,6 +163,9 @@ class Context_area_ram_session : public Ram_session
Dataspace_component *dataspace_component =
dynamic_cast<Dataspace_component*>(Dataspace_capability::deref(ds));
if (!dataspace_component)
return;
for (unsigned i = 0; i < MAX_CORE_CONTEXTS; i++)
if (context_ds[i] == dataspace_component) {
context_ds[i] = 0;