Skip to content

Commit

Permalink
Bug fix crash in case of null path
Browse files Browse the repository at this point in the history
  • Loading branch information
SimoSbara committed Nov 23, 2023
1 parent 765e200 commit 092bea9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ input/*
output/*
out/*
build/*
bin/*
bin/*
CMakeSettings.json
6 changes: 6 additions & 0 deletions src/converter/ConverterGLTF.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,9 @@ int ConverterGLTF::insertIndices(std::vector<BYTE>& buffer, rw::Split* split, in

bool ConverterGLTF::convert(char* output, char* inputDff, char* inputTxd)
{
if (!inputDff || !inputTxd || !output)
return false;

std::ifstream dff(inputDff, std::ios::binary);
std::ifstream txd(inputTxd, std::ios::binary);

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

bool ConverterGLTF::convert(char* output, rw::Clump& dff, rw::TextureDictionary& txd)
{
if (!output)
return false;

if (dff.geometryList.size() <= 0)
return false;

Expand Down

0 comments on commit 092bea9

Please sign in to comment.