summaryrefslogtreecommitdiffstats
path: root/partition.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-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())