Chromium Code Reviews| Index: ash/root_window_controller.cc |
| diff --git a/ash/root_window_controller.cc b/ash/root_window_controller.cc |
| index 3af8f489002c05f1b530354e6ab9b435037b7505..7a6271a1c8dc98f1e6184a47dd2aa231cf339859 100644 |
| --- a/ash/root_window_controller.cc |
| +++ b/ash/root_window_controller.cc |
| @@ -464,10 +464,16 @@ void RootWindowController::ShowContextMenu( |
| if (!menu_model.get()) |
| return; |
| - views::MenuRunner menu_runner(menu_model.get()); |
| - views::Widget* widget = |
| - root_window_->GetProperty(kDesktopController)->widget(); |
| + internal::DesktopBackgroundWidgetController* background = |
| + root_window_->GetProperty(kDesktopController); |
| + if (!background) |
|
oshima
2013/04/04 13:44:51
can you explain when this happens in the comment w
Dmitry Polukhin
2013/04/04 14:42:45
Done.
|
| + return; |
| + views::Widget* widget = background->widget(); |
| + if (!widget) |
| + return; |
|
oshima
2013/04/04 13:44:51
can this happen?
Dmitry Polukhin
2013/04/04 14:42:45
I haven't seen this - removed.
|
| + |
| + views::MenuRunner menu_runner(menu_model.get()); |
| if (menu_runner.RunMenuAt( |
| widget, NULL, gfx::Rect(location_in_screen, gfx::Size()), |
| views::MenuItemView::TOPLEFT, views::MenuRunner::CONTEXT_MENU) == |