summaryrefslogtreecommitdiffstats
path: root/debuggerd/utility.cpp
diff options
context:
space:
mode:
authorBrigid Smith <brigidsmith@google.com>2014-06-17 13:59:52 -0700
committerElliott Hughes <enh@google.com>2014-06-17 14:24:43 -0700
commit1babede38b2431b3148d9ff387d309b3070ebfe8 (patch)
treed9e2b21a969213928efef6fc2693bc8cb648675d /debuggerd/utility.cpp
parent4dfe6faa932e255413dc4dbbaada7e19dd01efd4 (diff)
downloadsystem_core-1babede38b2431b3148d9ff387d309b3070ebfe8.tar.gz
system_core-1babede38b2431b3148d9ff387d309b3070ebfe8.tar.bz2
system_core-1babede38b2431b3148d9ff387d309b3070ebfe8.zip
Fixed logcat debug output issue.
Change-Id: Ibeb048b683ec11b05af23371e5e4b17cdd50fea0
Diffstat (limited to 'debuggerd/utility.cpp')
-rw-r--r--debuggerd/utility.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/debuggerd/utility.cpp b/debuggerd/utility.cpp
index a3acddfce..f0d92203c 100644
--- a/debuggerd/utility.cpp
+++ b/debuggerd/utility.cpp
@@ -58,8 +58,10 @@ bool is_allowed_in_logcat(enum logtype ltype) {
void _LOG(log_t* log, enum logtype ltype, const char* fmt, ...) {
bool write_to_tombstone = log && log->tfd;
- bool write_to_logcat = (!log || !log->quiet) && is_allowed_in_logcat(ltype)
- && (log && log->crashed_tid == log->current_tid);
+ bool write_to_logcat = (!log || !log->quiet) && is_allowed_in_logcat(ltype);
+ if (log != NULL) {
+ write_to_logcat &= (log->crashed_tid == log->current_tid);
+ }
bool write_to_activitymanager = log && log->amfd >= 0 && is_allowed_in_logcat(ltype);
char buf[512];