From b83d6e9b0402b59f47d9bacd88becc4c2e4bb7a8 Mon Sep 17 00:00:00 2001 From: Stephan Hadinger Date: Sun, 14 Nov 2021 18:23:08 +0100 Subject: [PATCH] Avoid bad ffsp pointer if no filesystem --- tasmota/xdrv_50_filesystem.ino | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tasmota/xdrv_50_filesystem.ino b/tasmota/xdrv_50_filesystem.ino index ebd5b681c..8a0ed1d16 100644 --- a/tasmota/xdrv_50_filesystem.ino +++ b/tasmota/xdrv_50_filesystem.ino @@ -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;