From c8937f8d401114ac4a0ff1e8d8a64df6b661f0f7 Mon Sep 17 00:00:00 2001
From: Martine Lenders <m.lenders@fu-berlin.de>
Date: Thu, 15 Nov 2018 14:04:28 +0100
Subject: [PATCH] core: use thread_has_msg_queue() for message queue check

---
 core/msg.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/core/msg.c b/core/msg.c
index 2afc1def31..2cef88571a 100644
--- a/core/msg.c
+++ b/core/msg.c
@@ -296,7 +296,7 @@ static int _msg_receive(msg_t *m, int block)
 
     int queue_index = -1;
 
-    if (me->msg_array) {
+    if (thread_has_msg_queue(me)) {
         queue_index = cib_get(&(me->msg_queue));
     }
 
@@ -381,7 +381,7 @@ int msg_avail(void)
 
     int queue_index = -1;
 
-    if (me->msg_array) {
+    if (thread_has_msg_queue(me)) {
         queue_index = cib_avail(&(me->msg_queue));
     }
 
-- 
GitLab