diff options
author | Michael Jurka <mikejurka@google.com> | 2011-10-14 06:25:36 -0700 |
---|---|---|
committer | Michael Jurka <mikejurka@google.com> | 2011-10-14 06:27:52 -0700 |
commit | 9d906c7742af73160df257a40a702e1cc4f87899 (patch) | |
tree | 359e3523c120b49831ab9c846433abeb7ac45670 /src/com | |
parent | 5130e401a005fcf6afba6e8e72a628fc45f9a287 (diff) | |
download | packages_apps_trebuchet-9d906c7742af73160df257a40a702e1cc4f87899.zip packages_apps_trebuchet-9d906c7742af73160df257a40a702e1cc4f87899.tar.gz packages_apps_trebuchet-9d906c7742af73160df257a40a702e1cc4f87899.tar.bz2 |
Fix NPE
Bug # 5455516
Change-Id: I61617d47d1275cfb983adb07e77b8293eb26a763
Diffstat (limited to 'src/com')
-rw-r--r-- | src/com/android/launcher2/Launcher.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java index 72ac390..0d6a286 100644 --- a/src/com/android/launcher2/Launcher.java +++ b/src/com/android/launcher2/Launcher.java @@ -246,7 +246,9 @@ public final class Launcher extends Activity private Runnable mBuildLayersRunnable = new Runnable() { public void run() { - mWorkspace.buildPageHardwareLayers(); + if (mWorkspace != null) { + mWorkspace.buildPageHardwareLayers(); + } } }; @@ -1259,6 +1261,7 @@ public final class Launcher extends Activity // Remove all pending runnables mHandler.removeMessages(ADVANCE_MSG); mHandler.removeMessages(0); + mWorkspace.removeCallbacks(mBuildLayersRunnable); // Stop callbacks from LauncherModel LauncherApplication app = ((LauncherApplication) getApplication()); |