From 1c8c79fd2bc341bc2405a09e5a95c1631bb2d39e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Devernay?= Date: Wed, 18 Jan 2017 09:46:09 +0100 Subject: [PATCH] IDistort: fix crash --- Distortion/Distortion.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Distortion/Distortion.cpp b/Distortion/Distortion.cpp index 68d02612a..416c9ee30 100644 --- a/Distortion/Distortion.cpp +++ b/Distortion/Distortion.cpp @@ -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( getDistortionModel(format, args.renderScale, time) );