Fix potential double destroy of AssetManager am: 0a8a1e9d40 am: 303d3874f2

Change-Id: I3ddb9a9b1b67341b76ead480662356944d9146e6
This commit is contained in:
Automerger Merge Worker
2020-01-29 00:28:12 +00:00

View File

@@ -1157,8 +1157,11 @@ public final class AssetManager implements AutoCloseable {
}
}
if (mObject != 0) {
nativeDestroy(mObject);
synchronized (this) {
if (mObject != 0) {
nativeDestroy(mObject);
mObject = 0;
}
}
}