mirror of
https://github.com/Binary-Coalescence/motorDSM.git
synced 2025-08-04 21:55:40 -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;
|
||||
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);
|
||||
|
Reference in New Issue
Block a user