Skip to content
This repository has been archived by the owner on Jul 18, 2020. It is now read-only.

Commit

Permalink
Avoid potential crashes with the new aux render passes
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidBluecame committed Sep 20, 2016
1 parent bd8a434 commit 2bab411
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/yafraycore/renderpasses.cc
Original file line number Diff line number Diff line change
Expand Up @@ -362,9 +362,17 @@ intPassTypes_t renderPasses_t::intPassTypeFromString(std::string intPassTypeStri

externalPassTileTypes_t renderPasses_t::tileType(int extPassIndex) const { return extPasses.at(extPassIndex).tileType; }

intPassTypes_t renderPasses_t::intPassTypeFromExtPassIndex(int extPassIndex) const { return extPasses.at(extPassIndex).intPassType; }
intPassTypes_t renderPasses_t::intPassTypeFromExtPassIndex(int extPassIndex) const
{
if(extPassesSize() > extPassIndex) return extPasses.at(extPassIndex).intPassType;
else return PASS_INT_DISABLED;
}

intPassTypes_t renderPasses_t::intPassTypeFromAuxPassIndex(int auxPassIndex) const { return auxPasses.at(auxPassIndex).intPassType; }
intPassTypes_t renderPasses_t::intPassTypeFromAuxPassIndex(int auxPassIndex) const
{
if(auxPassesSize() > auxPassIndex) return auxPasses.at(auxPassIndex).intPassType;
else return PASS_INT_DISABLED;
}

int renderPasses_t::extPassIndexFromType(extPassTypes_t extPassType) const
{
Expand Down

0 comments on commit 2bab411

Please sign in to comment.