Protect against NULL *parms pointer motor record.

This commit is contained in:
Ron Sluiter
2013-12-20 16:41:07 +00:00
parent 57c3afb8be
commit 0d999027c2
+2 -1
View File
@@ -157,7 +157,8 @@ static RTN_STATUS Micos_build_trans(motor_cmnd command, double *parms, struct mo
rtnval = OK;
buff[0] = '\0';
dval = parms[0];
/* Protect against NULL pointer with WRTITE_MSG(GO/STOP_AXIS/GET_INFO, NULL). */
dval = (parms == NULL) ? 0.0 : *parms;
ival = NINT(parms[0]);
rtnval = (RTN_STATUS) motor_start_trans_com(mr, Micos_cards);