commit | cefe0c65184b0a288fe0c4cdce721ebc0ffb8efa | [log] [tgz] |
---|---|---|
author | TreeHugger Robot <treehugger-gerrit@google.com> | Tue Mar 06 01:59:14 2018 +0000 |
committer | Android (Google) Code Review <android-gerrit@google.com> | Tue Mar 06 01:59:14 2018 +0000 |
tree | 2d2c5df2c63de3cf06c69ccbaff8f938f76fd917 | |
parent | 4a3dd2ba5835539f932c55eade37b7817f03c09b [diff] | |
parent | 484ea675dd5480db6e272c0fcb46ec5a9d733a24 [diff] |
Merge "Check mMediaProvider for null" into pi-dev
diff --git a/media/java/android/mtp/MtpDatabase.java b/media/java/android/mtp/MtpDatabase.java index a647dcc..32a00d5 100755 --- a/media/java/android/mtp/MtpDatabase.java +++ b/media/java/android/mtp/MtpDatabase.java
@@ -292,7 +292,9 @@ mCloseGuard.close(); if (mClosed.compareAndSet(false, true)) { mMediaScanner.close(); - mMediaProvider.close(); + if (mMediaProvider != null) { + mMediaProvider.close(); + } native_finalize(); } }