From d55f6a991501068e4fbc0e58e1d1f8d92e3aa94d Mon Sep 17 00:00:00 2001 From: Marc Emmers Date: Mon, 29 Oct 2018 13:56:45 +0100 Subject: [PATCH] Check if a queue is present. Return an error otherwise --- features/cellular/easy_cellular/CellularConnectionFSM.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/features/cellular/easy_cellular/CellularConnectionFSM.cpp b/features/cellular/easy_cellular/CellularConnectionFSM.cpp index 6319dbc942..6a5c1ae335 100644 --- a/features/cellular/easy_cellular/CellularConnectionFSM.cpp +++ b/features/cellular/easy_cellular/CellularConnectionFSM.cpp @@ -136,6 +136,10 @@ nsapi_error_t CellularConnectionFSM::init() } _at_queue = _cellularDevice->get_queue(); + if (!_at_queue) { + stop(); + return NSAPI_ERROR_NO_MEMORY; + } _at_queue->chain(&_queue); _retry_count = 0;