Commit 60c6d196 authored by keybuk@google.com's avatar keybuk@google.com

bluetooth: guard adapter_ in destructor

Since we don't set adapter_ early, it's possible for the destructor
to be called without it ever being initialized. Guard that call.

BUG=none
TEST=emerge chromeos-chrome

Change-Id: I64724c3bf7272b9d5588713872627462ebcbe878

R=jhawkins@chromium.org

Review URL: https://chromiumcodereview.appspot.com/9702076

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126946 0039d316-1c4b-4281-b951-d872f2087c98
parent 5cdd2bfd
...@@ -59,7 +59,8 @@ BluetoothOptionsHandler::~BluetoothOptionsHandler() { ...@@ -59,7 +59,8 @@ BluetoothOptionsHandler::~BluetoothOptionsHandler() {
return; return;
} }
adapter_->RemoveObserver(this); if (adapter_.get())
adapter_->RemoveObserver(this);
} }
void BluetoothOptionsHandler::GetLocalizedValues( void BluetoothOptionsHandler::GetLocalizedValues(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment