From bd84c988cfe7f0e901093cce89576943708653e1 Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Thu, 15 Dec 2011 12:59:44 +0000 Subject: [PATCH] Check that DOMStorageContext is non-NULL in UIT_SetStoragePath before dereferencing. git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@418 5089003a-bbd8-11dd-ad1f-f1f9622dbc98 --- libcef/cef_context.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libcef/cef_context.cc b/libcef/cef_context.cc index a04bdbe0e..e6488748f 100644 --- a/libcef/cef_context.cc +++ b/libcef/cef_context.cc @@ -343,7 +343,10 @@ void UIT_SetStoragePath(int64 namespace_id, const CefString& path) if (!path.empty()) file_path = FilePath(path); - _Context->storage_context()->SetLocalStoragePath(file_path); + DOMStorageContext* context = _Context->storage_context(); + DCHECK(context); + if (context) + context->SetLocalStoragePath(file_path); } } // anonymous