From 3a733a77e32ea112516b4a7ef0b571d6bcc51315 Mon Sep 17 00:00:00 2001 From: Dave Hawkey Date: Mon, 30 Sep 2013 11:52:21 -0600 Subject: [PATCH] Fix NPE if workspace is not created yet Change-Id: I0c8976a8497e2059ec7b2cda3d56eb965a532765 --- src/com/android/launcher3/Launcher.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java index ba34c136c6..2b08bf0433 100644 --- a/src/com/android/launcher3/Launcher.java +++ b/src/com/android/launcher3/Launcher.java @@ -492,7 +492,7 @@ public class Launcher extends Activity * ensure the custom content page is added or removed if necessary. */ protected void invalidateHasCustomContentToLeft() { - if (mWorkspace.getScreenOrder().isEmpty()) { + if (mWorkspace == null || mWorkspace.getScreenOrder().isEmpty()) { // Not bound yet, wait for bindScreens to be called. return; }