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

Commit 7aa150c0 authored by Jason Sams's avatar Jason Sams
Browse files

Detect and throw exception for using

objects after explicitly destroying them.

Change-Id: Ic50d6974c80672846140c7f9435ec9468855f0bc
parent f88c5941
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -32,6 +32,9 @@ class BaseObj {
    }

    public int getID() {
        if (mDestroyed) {
            throw new IllegalStateException("using a destroyed object.");
        }
        return mID;
    }