From cad69a751659cbe32af4ff6e0ddcf01b313bf8c0 Mon Sep 17 00:00:00 2001 From: Mark Raynsford Date: Thu, 21 May 2015 16:34:18 +0000 Subject: [PATCH] Do not assume that if an argument bundle exists at all, then it must contain catalog stacks --- .../org/nypl/simplified/app/catalog/CatalogActivity.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/simplified-app/src/main/java/org/nypl/simplified/app/catalog/CatalogActivity.java b/simplified-app/src/main/java/org/nypl/simplified/app/catalog/CatalogActivity.java index d42f898c8..83e899433 100644 --- a/simplified-app/src/main/java/org/nypl/simplified/app/catalog/CatalogActivity.java +++ b/simplified-app/src/main/java/org/nypl/simplified/app/catalog/CatalogActivity.java @@ -62,8 +62,12 @@ private void configureUpButton( final Intent i = NullCheck.notNull(this.getIntent()); final Bundle a = i.getExtras(); if (a != null) { - return (ImmutableStack) NullCheck.notNull(a - .getSerializable(CatalogActivity.CATALOG_UP_STACK_ID)); + final ImmutableStack stack = + (ImmutableStack) a + .getSerializable(CatalogActivity.CATALOG_UP_STACK_ID); + if (stack != null) { + return stack; + } } final ImmutableStack empty = ImmutableStack.empty();