We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1868af1 commit 3703061Copy full SHA for 3703061
src/SD.cpp
@@ -280,7 +280,7 @@ void File::ls(uint8_t flags, uint8_t indent)
280
sprintf(fullPath, "%s/%s", _name, fn);
281
File filtmp = SD.open(fullPath);
282
283
- if (filtmp._name != NULL) {
+ if (filtmp) {
284
Serial.println();
285
filtmp.ls(flags, indent + 2);
286
filtmp.close();
@@ -391,6 +391,7 @@ void File::close()
391
f_close(_fil);
392
}
393
free(_fil);
394
+ _fil = NULL;
395
396
397
#if _FATFS == 68300
@@ -402,6 +403,7 @@ void File::close()
402
403
404
405
free(_name);
406
+ _name = NULL;
407
408
409
0 commit comments