From 649c6e48869cd710a0ceab64b3a7ba6879da0ba7 Mon Sep 17 00:00:00 2001 From: "agl@chromium.org" Date: Fri, 24 Apr 2009 02:21:59 +0000 Subject: Linux: unit tests fix. The unit tests will try and create a RenderViewHost with a NULL widget. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14406 0039d316-1c4b-4281-b951-d872f2087c98 --- base/gfx/gtk_native_view_id_manager.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/base/gfx/gtk_native_view_id_manager.cc b/base/gfx/gtk_native_view_id_manager.cc index 848e1eb..a2d8bb6 100644 --- a/base/gfx/gtk_native_view_id_manager.cc +++ b/base/gfx/gtk_native_view_id_manager.cc @@ -39,6 +39,10 @@ GtkNativeViewManager::GtkNativeViewManager() { } gfx::NativeViewId GtkNativeViewManager::GetIdForWidget(gfx::NativeView widget) { + // This is just for unit tests: + if (!widget) + return 0; + AutoLock locked(lock_); std::map::const_iterator i = -- cgit v1.1