From: rmceoin Date: Tue, 11 Aug 2009 00:20:28 +0000 (+0000) Subject: OI Safe: fixed bug with double onFinish() X-Git-Url: https://hydra-www.ietfng.org/gitweb/?a=commitdiff_plain;h=718f76ba0e28405dd05486dfe23cca04e33cec86;p=android-vcpass-oisafe OI Safe: fixed bug with double onFinish() 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 --- diff --git a/src/org/openintents/safe/CategoryList.java b/src/org/openintents/safe/CategoryList.java index 43f9ee3..9296b88 100644 --- a/src/org/openintents/safe/CategoryList.java +++ b/src/org/openintents/safe/CategoryList.java @@ -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