Fix logic error. Fixes #104

This commit is contained in:
Syoyo Fujita 2018-11-05 13:32:43 +09:00
parent 924d86e362
commit 33514af61a

View File

@ -1703,7 +1703,7 @@ bool WriteImageData(const std::string *basepath, const std::string *filename,
} else {
// Write image to disc
FsCallbacks *fs = reinterpret_cast<FsCallbacks *>(fsPtr);
if (fs != nullptr && fs->WriteWholeFile == nullptr) {
if ((fs != nullptr) && (fs->WriteWholeFile != nullptr)) {
const std::string imagefilepath = JoinPath(*basepath, *filename);
std::string writeError;
if (!fs->WriteWholeFile(&writeError, imagefilepath, data,