Bug 811654 - Make AllPagesTab's destroy() idempotent (r=mfinkle)
authorLucas Rocha <lucasr@mozilla.com>
Wed, 14 Nov 2012 16:23:26 +0000
changeset 113241 1e854c407aaa21fb46200d9f57bf814ac124360c
parent 113240 b9a7dc96bf7c24fd220d8963b6106bb04259885e
child 113242 e6e9cda2871a517d24b45944f5182c3f5c04c3f0
push id23864
push userryanvm@gmail.com
push dateThu, 15 Nov 2012 02:43:16 +0000
treeherdermozilla-central@7845cfa93e3f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmfinkle
bugs811654
milestone19.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 811654 - Make AllPagesTab's destroy() idempotent (r=mfinkle)
mobile/android/base/awesomebar/AllPagesTab.java
--- a/mobile/android/base/awesomebar/AllPagesTab.java
+++ b/mobile/android/base/awesomebar/AllPagesTab.java
@@ -146,19 +146,21 @@ public class AllPagesTab extends Awesome
         if (adapter == null) {
             return;
         }
 
         Cursor cursor = adapter.getCursor();
         if (cursor != null)
             cursor.close();
 
-        mHandler.removeMessages(MESSAGE_UPDATE_FAVICONS);
-        mHandler.removeMessages(MESSAGE_LOAD_FAVICONS);
-        mHandler = null;
+        if (mHandler != null) {
+            mHandler.removeMessages(MESSAGE_UPDATE_FAVICONS);
+            mHandler.removeMessages(MESSAGE_LOAD_FAVICONS);
+            mHandler = null;
+        }
     }
 
     public void filter(String searchTerm) {
         AwesomeBarCursorAdapter adapter = getCursorAdapter();
         adapter.filter(searchTerm);
 
         filterSuggestions(searchTerm);
         if (mSuggestionsOptInPrompt != null) {