Skip to content

Commit

Permalink
Main: do not throw when parsing an invalid .compositor
Browse files Browse the repository at this point in the history
  • Loading branch information
paroj committed Aug 23, 2024
1 parent 5694f6c commit 60d2351
Showing 1 changed file with 18 additions and 12 deletions.
30 changes: 18 additions & 12 deletions OgreMain/src/OgreScriptTranslator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4790,18 +4790,24 @@ namespace Ogre{


// No errors, create
CompositionTechnique::TextureDefinition *def = mTechnique->createTextureDefinition(atom0->value);
def->width = width;
def->height = height;
def->type = type;
def->widthFactor = widthFactor;
def->heightFactor = heightFactor;
def->formatList = formats;
def->fsaa = fsaa;
def->hwGammaWrite = hwGammaWrite;
def->depthBufferId = depthBufferId;
def->pooled = pooled;
def->scope = scope;
try {
CompositionTechnique::TextureDefinition *def = mTechnique->createTextureDefinition(atom0->value);
def->width = width;
def->height = height;
def->type = type;
def->widthFactor = widthFactor;
def->heightFactor = heightFactor;
def->formatList = formats;
def->fsaa = fsaa;
def->hwGammaWrite = hwGammaWrite;
def->depthBufferId = depthBufferId;
def->pooled = pooled;
def->scope = scope;
}
catch (Exception &e)
{
compiler->addError(ScriptCompiler::CE_INVALIDPARAMETERS, prop->file, prop->line, e.getDescription());
}
}
break;
case ID_TEXTURE_REF:
Expand Down

0 comments on commit 60d2351

Please sign in to comment.