summaryrefslogtreecommitdiffstats
path: root/runtime/monitor.cc
diff options
context:
space:
mode:
authorMathieu Chartier <mathieuc@google.com>2013-10-30 09:45:13 -0700
committerMathieu Chartier <mathieuc@google.com>2013-10-30 09:45:56 -0700
commit9728f91a63016136261231ff5213bde703bd27b6 (patch)
treea5da6d2ed4942a5b8fc00ad73551d7794703206b /runtime/monitor.cc
parent30839a76a9efbda83189420b6cbce66cd7d15dd2 (diff)
downloadart-9728f91a63016136261231ff5213bde703bd27b6.zip
art-9728f91a63016136261231ff5213bde703bd27b6.tar.gz
art-9728f91a63016136261231ff5213bde703bd27b6.tar.bz2
Add missing null check in monitor install.
Fixes broken OTA. Change-Id: I3a89e4755dc6b23d214ec542df3d167e788b904d
Diffstat (limited to 'runtime/monitor.cc')
-rw-r--r--runtime/monitor.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/monitor.cc b/runtime/monitor.cc
index b1bf84f..aa47bda 100644
--- a/runtime/monitor.cc
+++ b/runtime/monitor.cc
@@ -123,7 +123,7 @@ bool Monitor::Install(Thread* self) {
// Publish the updated lock word, which may race with other threads.
bool success = obj_->CasLockWord(lw, fat);
// Lock profiling.
- if (success && lock_profiling_threshold_ != 0) {
+ if (success && owner_ != nullptr && lock_profiling_threshold_ != 0) {
locking_method_ = owner_->GetCurrentMethod(&locking_dex_pc_);
}
return success;