summaryrefslogtreecommitdiffstats
path: root/partition.cpp
diff options
context:
space:
mode:
authorMatt Mower <mowerm@gmail.com>2017-02-15 03:20:59 +0100
committerDees Troy <dees_troy@teamw.in>2017-02-23 19:42:48 +0100
commita8e6d8315573d10d12b26d3b78c5820e5244dfe8 (patch)
treee9237d41e569b30a97bd6387dc2538398f795a4b /partition.cpp
parentOnly change USB mode to mtp when ready for MTP (diff)
downloadandroid_bootable_recovery-a8e6d8315573d10d12b26d3b78c5820e5244dfe8.tar
android_bootable_recovery-a8e6d8315573d10d12b26d3b78c5820e5244dfe8.tar.gz
android_bootable_recovery-a8e6d8315573d10d12b26d3b78c5820e5244dfe8.tar.bz2
android_bootable_recovery-a8e6d8315573d10d12b26d3b78c5820e5244dfe8.tar.lz
android_bootable_recovery-a8e6d8315573d10d12b26d3b78c5820e5244dfe8.tar.xz
android_bootable_recovery-a8e6d8315573d10d12b26d3b78c5820e5244dfe8.tar.zst
android_bootable_recovery-a8e6d8315573d10d12b26d3b78c5820e5244dfe8.zip
Diffstat (limited to 'partition.cpp')
-rw-r--r--partition.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/partition.cpp b/partition.cpp
index 5cf017987..8832909fe 100644
--- a/partition.cpp
+++ b/partition.cpp
@@ -1318,7 +1318,7 @@ bool TWPartition::UnMount(bool Display_Error) {
if (never_unmount_system == 1 && Mount_Point == "/system")
return true; // Never unmount system if you're not supposed to unmount it
- if (Is_Storage)
+ if (Is_Storage && MTP_Storage_ID > 0)
PartitionManager.Remove_MTP_Storage(MTP_Storage_ID);
if (!Symlink_Mount_Point.empty())