瀏覽代碼

cmProc4.c:Check for valid parameters in _cmScModActivate()

master
kevin 10 年之前
父節點
當前提交
a91cf15a24
共有 1 個檔案被更改,包括 9 行新增6 行删除
  1. 9
    6
      cmProc4.c

+ 9
- 6
cmProc4.c 查看文件

@@ -3985,14 +3985,17 @@ cmRC_t _cmScModActivate(cmScModulator* p, cmScModEntry_t* ep )
3985 3985
   cmScModVar_t* vp = ep->varPtr;
3986 3986
 
3987 3987
   // optionally update the min/max/rate values in the target var
3988
-  if((rc = _cmScModGetParam(p,&ep->min,&vp->min)) != cmOkRC )
3989
-    goto errLabel;
3988
+  if( ep->min.pid != kInvalidModPId )
3989
+    if((rc = _cmScModGetParam(p,&ep->min,&vp->min)) != cmOkRC )
3990
+      goto errLabel;
3990 3991
 
3991
-  if((rc = _cmScModGetParam(p,&ep->max,&vp->max)) != cmOkRC )
3992
-    goto errLabel;
3992
+  if( ep->max.pid != kInvalidModPId )
3993
+    if((rc = _cmScModGetParam(p,&ep->max,&vp->max)) != cmOkRC )
3994
+      goto errLabel;
3993 3995
 
3994
- if((rc = _cmScModGetParam(p,&ep->rate,&vp->rate)) != cmOkRC )
3995
-    goto errLabel;
3996
+  if( ep->rate.pid != kInvalidModPId )
3997
+    if((rc = _cmScModGetParam(p,&ep->rate,&vp->rate)) != cmOkRC )
3998
+      goto errLabel;
3996 3999
 
3997 4000
 
3998 4001
   switch( ep->typeId )

Loading…
取消
儲存