Fixed the bus msg response crash in case when the server did not handle the
message and returned null.
Signed-off-by: Mika Laitio <lamikr@pilppa.org>
BusMessage *msg_rsp;
DataItemSequence *seq;
- msg_req = new BusMessageInternal(req_seq_param);
+ seq = NULL;
msg_rsp = NULL;
+ msg_req = new BusMessageInternal(req_seq_param);
_listener->request_received(msg_req, &msg_rsp);
- //rsp_seq_param = new DataItemSequence_out(msg_rsp._dataItemSeq);
- seq = (DataItemSequence *)msg_rsp->_dataItemSeq;
+ if (msg_rsp != NULL) {
+ seq = (DataItemSequence *)msg_rsp->_dataItemSeq;
+ }
+ else {
+ seq = new DataItemSequence();
+ }
rsp_seq_param._data = seq;
return 0;