From a91cf15a24cfff895a2f8f5ff29916deb15a6695 Mon Sep 17 00:00:00 2001 From: kevin Date: Mon, 12 Aug 2013 16:39:49 -0700 Subject: [PATCH] cmProc4.c:Check for valid parameters in _cmScModActivate() --- cmProc4.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/cmProc4.c b/cmProc4.c index 1f12643..8b6deb0 100644 --- a/cmProc4.c +++ b/cmProc4.c @@ -3985,14 +3985,17 @@ cmRC_t _cmScModActivate(cmScModulator* p, cmScModEntry_t* ep ) cmScModVar_t* vp = ep->varPtr; // optionally update the min/max/rate values in the target var - if((rc = _cmScModGetParam(p,&ep->min,&vp->min)) != cmOkRC ) - goto errLabel; + if( ep->min.pid != kInvalidModPId ) + if((rc = _cmScModGetParam(p,&ep->min,&vp->min)) != cmOkRC ) + goto errLabel; - if((rc = _cmScModGetParam(p,&ep->max,&vp->max)) != cmOkRC ) - goto errLabel; + if( ep->max.pid != kInvalidModPId ) + if((rc = _cmScModGetParam(p,&ep->max,&vp->max)) != cmOkRC ) + goto errLabel; - if((rc = _cmScModGetParam(p,&ep->rate,&vp->rate)) != cmOkRC ) - goto errLabel; + if( ep->rate.pid != kInvalidModPId ) + if((rc = _cmScModGetParam(p,&ep->rate,&vp->rate)) != cmOkRC ) + goto errLabel; switch( ep->typeId )