Skip to content

Commit

Permalink
Fixes crash in BookmarksApiUnittest.Update unit test.
Browse files Browse the repository at this point in the history
The crash happens due to dereferencing an unintialized pointer.
This is fixed on master as part of
#3692, specifically in
054fd5a
but I don't think we should be uplifting all that just for a unit test
crash. So, instead just added a pointer null check.
  • Loading branch information
mkarolin committed Dec 3, 2019
1 parent 80d946b commit 8fa87c7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion browser/extensions/brave_extension_management.cc
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ void BraveExtensionManagement::RegisterBraveExtensions() {
#if BUILDFLAG(ENABLE_TOR)
const base::CommandLine& command_line =
*base::CommandLine::ForCurrentProcess();
if (!command_line.HasSwitch(switches::kDisableTorClientUpdaterExtension))
if (g_brave_browser_process &&
!command_line.HasSwitch(switches::kDisableTorClientUpdaterExtension))
g_brave_browser_process->tor_client_updater()->Register();
#endif
}
Expand Down

0 comments on commit 8fa87c7

Please sign in to comment.