Prevent NPE
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
0.3.1
|
||||
* Fixed crash when clicking "Create new contact" button
|
||||
* Fixed occasional crash when Bote disconnects from network
|
||||
* Added labels to the address book actions menu
|
||||
|
||||
0.3 / 2014-12-01 / ebba8aac78d50eda9d25f936e8bd348553966649
|
||||
|
||||
@@ -90,10 +90,12 @@ public class BoteService extends Service implements NetworkStatusListener, NewEm
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
if (mTriedBindState) {
|
||||
try {
|
||||
mStateService.unregisterCallback(mStatusListener);
|
||||
} catch (RemoteException e) {}
|
||||
if (mTriedBindState && mStateConnection != null) {
|
||||
if (mStateService != null) {
|
||||
try {
|
||||
mStateService.unregisterCallback(mStatusListener);
|
||||
} catch (RemoteException e) {}
|
||||
}
|
||||
unbindService(mStateConnection);
|
||||
}
|
||||
mTriedBindState = false;
|
||||
|
||||
Reference in New Issue
Block a user