mirror of https://github.com/arendst/Tasmota.git
Avoid bad ffsp pointer if no filesystem
This commit is contained in:
parent
75d6f4ed89
commit
b83d6e9b04
|
@ -102,7 +102,7 @@ void UfsInitOnce(void) {
|
||||||
#ifdef ESP8266
|
#ifdef ESP8266
|
||||||
ffsp = &LittleFS;
|
ffsp = &LittleFS;
|
||||||
if (!LittleFS.begin()) {
|
if (!LittleFS.begin()) {
|
||||||
ffsp = 0;
|
ffsp = nullptr;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif // ESP8266
|
#endif // ESP8266
|
||||||
|
@ -114,6 +114,7 @@ void UfsInitOnce(void) {
|
||||||
// ffat is second
|
// ffat is second
|
||||||
ffsp = &FFat;
|
ffsp = &FFat;
|
||||||
if (!FFat.begin(true)) {
|
if (!FFat.begin(true)) {
|
||||||
|
ffsp = nullptr;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ffs_type = UFS_TFAT;
|
ffs_type = UFS_TFAT;
|
||||||
|
|
Loading…
Reference in New Issue