]> hydra-www.ietfng.org Git - android-vcpass-oisafe/commitdiff
OI Safe: fixed bug with double onFinish()
authorrmceoin <rmceoin@72b678ce-9140-0410-bee8-679b907dd61a>
Tue, 11 Aug 2009 00:20:28 +0000 (00:20 +0000)
committerrmceoin <rmceoin@72b678ce-9140-0410-bee8-679b907dd61a>
Tue, 11 Aug 2009 00:20:28 +0000 (00:20 +0000)
Only saw this bug once and don't know how to duplicate, but felt it was
safe enough to simply just keep track of deregistering by setting to null.

git-svn-id: http://openintents.googlecode.com/svn/trunk/Safe@2274 72b678ce-9140-0410-bee8-679b907dd61a

src/org/openintents/safe/CategoryList.java

index 43f9ee35d18fdf58d761d1ea789628b71d82eae9..9296b8845adbfb6a9663204f215b6d502d5a47ca 100644 (file)
@@ -305,7 +305,11 @@ public class CategoryList extends ListActivity {
     @Override
     public void onDestroy() {
                super.onDestroy();
-               unregisterReceiver(mIntentReceiver);
+               
+               if (mIntentReceiver!=null) {
+                       unregisterReceiver(mIntentReceiver);
+                       mIntentReceiver=null;
+               }
                if (debug) Log.d(TAG,"onDestroy()");
     }
     @Override