Small changes
Dependencies: FATFileSystem
Fork of EALib by
Diff: QSPIFileSystem.cpp
- Revision:
- 19:494c266fb249
- Parent:
- 18:9f1f1a8b4729
--- a/QSPIFileSystem.cpp Mon Oct 27 10:18:08 2014 +0000 +++ b/QSPIFileSystem.cpp Tue Jan 06 16:36:38 2015 +0000 @@ -1196,6 +1196,12 @@ QSPIDirHandle* QSPIDirHandle::openDir(const char* dirname) { QSPIDirHandle* d = new QSPIDirHandle(dirname); + + if( d == NULL ) { + // failed to allocate memory + return d; + } + if (d->dirname == NULL) { // failed to allocate memory for the folder name delete d;