diff options
Diffstat (limited to 'gps/utils/MsgTask.cpp')
-rw-r--r-- | gps/utils/MsgTask.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gps/utils/MsgTask.cpp b/gps/utils/MsgTask.cpp index eaead5c..73a77fd 100644 --- a/gps/utils/MsgTask.cpp +++ b/gps/utils/MsgTask.cpp @@ -74,16 +74,19 @@ void MsgTask::destroy() { } void MsgTask::sendMsg(const LocMsg* msg) const { - if (msg) { + if (msg && this) { msg_q_snd((void*)mQ, (void*)msg, LocMsgDestroy); } else { - LOC_LOGE("%s: msg is NULL", __func__); + LOC_LOGE("%s: msg is %p and this is %p", + __func__, msg, this); } } void MsgTask::prerun() { +#ifndef FEATURE_EXTERNAL_AP // make sure we do not run in background scheduling group set_sched_policy(gettid(), SP_FOREGROUND); +#endif /* FEATURE_EXTERNAL_AP */ } bool MsgTask::run() { |