summaryrefslogtreecommitdiffstats
path: root/partitionmanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'partitionmanager.cpp')
-rw-r--r--partitionmanager.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/partitionmanager.cpp b/partitionmanager.cpp
index 003dcd1f3..be6674b88 100644
--- a/partitionmanager.cpp
+++ b/partitionmanager.cpp
@@ -2015,6 +2015,8 @@ bool TWPartitionManager::Add_Remove_MTP_Storage(TWPartition* Part, int message_t
}
if (Part) {
+ if (Part->MTP_Storage_ID == 0)
+ return false;
if (message_type == MTP_MESSAGE_REMOVE_STORAGE) {
mtp_message.message_type = MTP_MESSAGE_REMOVE_STORAGE; // Remove
LOGINFO("sending message to remove %i\n", Part->MTP_Storage_ID);