Fixed bug with NULL pointer on non-vxWorks systems

This commit is contained in:
MarkRivers
2004-06-24 19:52:09 +00:00
parent 53060f54d1
commit b00ce1668f

View File

@@ -166,8 +166,9 @@ STATIC RTN_STATUS MCB4B_build_trans(motor_cmnd command, double *parms, struct mo
send = true;
rtnval = OK;
buff[0] = '\0';
dval = parms[0];
ival = NINT(parms[0]);
/* Protect against NULL pointer with WRTITE_MSG(GO/STOP_AXIS/GET_INFO, NULL). */
dval = (parms == NULL) ? 0.0 : *parms;
ival = NINT(dval);
rtnval = (RTN_STATUS) motor_start_trans_com(mr, MCB4B_cards);
Debug(5, "MCB4B_build_trans: entry, motor_start_trans_com=%d\n", rtnval);