From 02fccf5cb2fc5eae24e2e7f14f78b91607149cb5 Mon Sep 17 00:00:00 2001 From: Martin Stein Date: Tue, 5 Feb 2013 15:38:06 +0100 Subject: [PATCH] base-hw: fix bug in 'Platform_thread::pager()' --- base-hw/src/core/include/platform_thread.h | 2 +- base-hw/src/core/platform_thread.cc | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/base-hw/src/core/include/platform_thread.h b/base-hw/src/core/include/platform_thread.h index e8da286e73..485fef4bf3 100644 --- a/base-hw/src/core/include/platform_thread.h +++ b/base-hw/src/core/include/platform_thread.h @@ -151,7 +151,7 @@ namespace Genode { void pager(Pager_object * const pager); - Pager_object * pager() const; + Pager_object * pager(); unsigned pd_id() const { return _pd_id; } diff --git a/base-hw/src/core/platform_thread.cc b/base-hw/src/core/platform_thread.cc index b76d041e4f..ec813fe01e 100644 --- a/base-hw/src/core/platform_thread.cc +++ b/base-hw/src/core/platform_thread.cc @@ -160,9 +160,6 @@ void Platform_thread::pager(Pager_object * const pager) } -Genode::Pager_object * Platform_thread::pager() const -{ - assert(_rm_client) - return static_cast(_rm_client); -} +Genode::Pager_object * Platform_thread::pager() { + return _rm_client ? static_cast(_rm_client) : 0; }