Merge "gui: theme: Remove the TWRP app button from the reboot menu" into android-11
diff --git a/gui/action.cpp b/gui/action.cpp
index 9672751..819e4ad 100755
--- a/gui/action.cpp
+++ b/gui/action.cpp
@@ -1942,15 +1942,15 @@
 {
 	operation_start("Set Boot Slot");
 	if (!simulate) {
-		if (!PartitionManager.UnMount_By_Path("/vendor", false)) {
-			// PartitionManager failed to unmount /vendor, this should not happen,
-			// but in case it does, do a lazy unmount
-			LOGINFO("WARNING: vendor partition could not be unmounted normally!\n");
-			umount2("/vendor", MNT_DETACH);
-			PartitionManager.Set_Active_Slot(arg);
-		} else {
-			PartitionManager.Set_Active_Slot(arg);
+		if (PartitionManager.Find_Partition_By_Path("/vendor")) {
+			if (!PartitionManager.UnMount_By_Path("/vendor", false)) {
+				// PartitionManager failed to unmount /vendor, this should not happen,
+				// but in case it does, do a lazy unmount
+				LOGINFO("WARNING: vendor partition could not be unmounted normally!\n");
+				umount2("/vendor", MNT_DETACH);
+			}
 		}
+		PartitionManager.Set_Active_Slot(arg);
 	} else {
 		simulate_progress_bar();
 	}