Avoid bad ffsp pointer if no filesystem

This commit is contained in:
Stephan Hadinger 2021-11-14 18:23:08 +01:00
parent 75d6f4ed89
commit b83d6e9b04
1 changed files with 2 additions and 1 deletions

View File

@ -102,7 +102,7 @@ void UfsInitOnce(void) {
#ifdef ESP8266
ffsp = &LittleFS;
if (!LittleFS.begin()) {
ffsp = 0;
ffsp = nullptr;
return;
}
#endif // ESP8266
@ -114,6 +114,7 @@ void UfsInitOnce(void) {
// ffat is second
ffsp = &FFat;
if (!FFat.begin(true)) {
ffsp = nullptr;
return;
}
ffs_type = UFS_TFAT;