Skip to content

Commit

Permalink
IDistort: fix crash
Browse files Browse the repository at this point in the history
  • Loading branch information
devernay committed Jan 18, 2017
1 parent 3d36117 commit 1c8c79f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Distortion/Distortion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2314,8 +2314,10 @@ DistortionPlugin::setupAndProcess(DistortionProcessorBase &processor,
vScale *= args.renderScale.y;
}
OfxRectI format = {0, 1, 0, 1};
double par = 1.;
getLensDistortionFormat(time, args.renderScale, &format, &par);
if (_plugin == eDistortionPluginLensDistortion) {
double par = 1.;
getLensDistortionFormat(time, args.renderScale, &format, &par);
}

DirectionEnum direction = _direction ? (DirectionEnum)_direction->getValue() : eDirectionDistort;
std::auto_ptr<DistortionModel> distortionModel( getDistortionModel(format, args.renderScale, time) );
Expand Down

0 comments on commit 1c8c79f

Please sign in to comment.