Bug 811654 - Make AllPagesTab's destroy() idempotent (r=mfinkle)
authorLucas Rocha <lucasr@mozilla.com>
Wed, 14 Nov 2012 16:23:26 +0000
changeset 113236 1e854c407aaa21fb46200d9f57bf814ac124360c
parent 113235 b9a7dc96bf7c24fd220d8963b6106bb04259885e
child 113237 e6e9cda2871a517d24b45944f5182c3f5c04c3f0
push id18024
push userlrocha@mozilla.com
push dateWed, 14 Nov 2012 16:24:51 +0000
treeherdermozilla-inbound@1e854c407aaa [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) {