Commit e2008f1a authored by Xiaochu Liu's avatar Xiaochu Liu Committed by chrome-bot
Browse files

update_engine: check pointer for nullptr

Member processor_ in ScopedActionCompleter is a raw pointer that is not
owned by ScopedActionCompleter. However in ScopedActionCompleter's
d'tor, it assumes processor_ is not nullptr and call its ActionComplete
function.

Add a CHECK() in c'tor making sure the object in the first place is not nullptr.

BUG=None
TEST=emerge-kefka update_engine, unittest

Change-Id: Ifce060667c8b4280d42d1f0fbca3588bcbe89f3d
Reviewed-on: https://chromium-review.googlesource.com/1342943


Commit-Ready: Xiaochu Liu <xiaochu@chromium.org>
Tested-by: default avatarXiaochu Liu <xiaochu@chromium.org>
Reviewed-by: default avatarAmin Hassani <ahassani@chromium.org>
Reviewed-by: default avatarSen Jiang <senj@chromium.org>
parent eab915e3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment