Browse Source

initi sort order loop

PavelSindler 7 years ago
parent
commit
7968d1b3cb
1 changed files with 1 additions and 0 deletions
  1. 1 0
      Firmware/cardreader.cpp

+ 1 - 0
Firmware/cardreader.cpp

@@ -834,6 +834,7 @@ void CardReader::presort() {
 		if (fileCnt > 1) {
 		if (fileCnt > 1) {
 			// Init sort order.
 			// Init sort order.
 			for (uint16_t i = 0; i < fileCnt; i++) {
 			for (uint16_t i = 0; i < fileCnt; i++) {
+				if (!IS_SD_INSERTED) return;
 				manage_heater();
 				manage_heater();
 				sort_order[i] = i;
 				sort_order[i] = i;