Fix crash bug when trying to send to a socketcan device that wasn't properly opened.
This commit is contained in:
@@ -109,6 +109,8 @@ bool SocketCan::piSendFrame(const CANFrame& pFrame)
|
||||
if(0 != pFrame.bus || pFrame.len>8)
|
||||
return false;
|
||||
|
||||
if (!mDev_p) return false;
|
||||
|
||||
/* fill frame */
|
||||
QCanBusFrame frame;
|
||||
frame.setFrameId(pFrame.ID);
|
||||
|
||||
Reference in New Issue
Block a user