Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c2f4102e authored by Andre Eisenbach's avatar Andre Eisenbach
Browse files

Prevent possible NullPointerException when service is destroyed

Bug: 18757778
Change-Id: Iaf2c8e41a5733379d171f58a35d09c506080fe5d
parent 96da8e36
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -174,7 +174,8 @@ public abstract class ProfileService extends Service {
    @Override
    @Override
    public void onDestroy() {
    public void onDestroy() {
        if (DBG) log("Destroying service.");
        if (DBG) log("Destroying service.");
        mAdapterService.removeProfile(this);
        if (mAdapterService != null) mAdapterService.removeProfile(this);

        if (mCleaningUp) {
        if (mCleaningUp) {
            if (DBG) log("Cleanup already started... Skipping cleanup()...");
            if (DBG) log("Cleanup already started... Skipping cleanup()...");
        } else {
        } else {