mirror of
https://github.com/Binary-Coalescence/motorDSM.git
synced 2025-08-05 14:15:39 -05:00
Fixed bug with NULL pointer on non-vxWorks systems
This commit is contained in:
@@ -166,8 +166,9 @@ STATIC RTN_STATUS MCB4B_build_trans(motor_cmnd command, double *parms, struct mo
|
|||||||
send = true;
|
send = true;
|
||||||
rtnval = OK;
|
rtnval = OK;
|
||||||
buff[0] = '\0';
|
buff[0] = '\0';
|
||||||
dval = parms[0];
|
/* Protect against NULL pointer with WRTITE_MSG(GO/STOP_AXIS/GET_INFO, NULL). */
|
||||||
ival = NINT(parms[0]);
|
dval = (parms == NULL) ? 0.0 : *parms;
|
||||||
|
ival = NINT(dval);
|
||||||
|
|
||||||
rtnval = (RTN_STATUS) motor_start_trans_com(mr, MCB4B_cards);
|
rtnval = (RTN_STATUS) motor_start_trans_com(mr, MCB4B_cards);
|
||||||
Debug(5, "MCB4B_build_trans: entry, motor_start_trans_com=%d\n", rtnval);
|
Debug(5, "MCB4B_build_trans: entry, motor_start_trans_com=%d\n", rtnval);
|
||||||
|
Reference in New Issue
Block a user