summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--storeio/pager.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/storeio/pager.c b/storeio/pager.c
index e85104c5..bb6ccd36 100644
--- a/storeio/pager.c
+++ b/storeio/pager.c
@@ -175,7 +175,8 @@ pager_dropweak (struct user_pager_info *upi __attribute__ ((unused)))
int
dev_stop_paging (struct dev *dev, int nosync)
{
- size_t num_pagers = ports_count_bucket (pager_port_bucket);
+ size_t num_pagers = (pager_port_bucket ?
+ ports_count_bucket (pager_port_bucket) : 0);
if (num_pagers > 0 && !nosync)
{