mirror of
https://git.mirrors.martin98.com/https://github.com/syoyo/tinygltf.git
synced 2025-08-15 11:25:55 +08:00
Fix logic error. Fixes #104
This commit is contained in:
parent
924d86e362
commit
33514af61a
@ -1703,7 +1703,7 @@ bool WriteImageData(const std::string *basepath, const std::string *filename,
|
|||||||
} else {
|
} else {
|
||||||
// Write image to disc
|
// Write image to disc
|
||||||
FsCallbacks *fs = reinterpret_cast<FsCallbacks *>(fsPtr);
|
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);
|
const std::string imagefilepath = JoinPath(*basepath, *filename);
|
||||||
std::string writeError;
|
std::string writeError;
|
||||||
if (!fs->WriteWholeFile(&writeError, imagefilepath, data,
|
if (!fs->WriteWholeFile(&writeError, imagefilepath, data,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user