Fix potential double destroy of AssetManager am: 0a8a1e9d40

Change-Id: I10010fa2087e7978dc88b1d1e6f6e5d3a4661499
This commit is contained in:
Automerger Merge Worker
2020-01-29 00:12:51 +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;
}
}
}