Fix logic error. Fixes #104

This commit is contained in:
Syoyo Fujita
2018-11-05 13:32:43 +09:00
parent 48b6826198
commit 67faff5842
+1 -1
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,