Skip to content

Commit 092bea9

Browse files
committed
Bug fix crash in case of null path
1 parent 765e200 commit 092bea9

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ input/*
33
output/*
44
out/*
55
build/*
6-
bin/*
6+
bin/*
7+
CMakeSettings.json

src/converter/ConverterGLTF.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -432,6 +432,9 @@ int ConverterGLTF::insertIndices(std::vector<BYTE>& buffer, rw::Split* split, in
432432

433433
bool ConverterGLTF::convert(char* output, char* inputDff, char* inputTxd)
434434
{
435+
if (!inputDff || !inputTxd || !output)
436+
return false;
437+
435438
std::ifstream dff(inputDff, std::ios::binary);
436439
std::ifstream txd(inputTxd, std::ios::binary);
437440

@@ -453,6 +456,9 @@ bool ConverterGLTF::convert(char* output, rw::Clump& dff)
453456

454457
bool ConverterGLTF::convert(char* output, rw::Clump& dff, rw::TextureDictionary& txd)
455458
{
459+
if (!output)
460+
return false;
461+
456462
if (dff.geometryList.size() <= 0)
457463
return false;
458464

0 commit comments

Comments
 (0)