diff options
author | oshima@google.com <oshima@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-13 23:02:45 +0000 |
---|---|---|
committer | oshima@google.com <oshima@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-13 23:02:45 +0000 |
commit | 5e8d27087b478de2d7136fa9016c4e178e19305e (patch) | |
tree | a2285081163fdf8ed1cc1ec3031120551dc0ff86 /views | |
parent | 37a1768838a2a4bcec2cafbf05f3c026938beb9a (diff) | |
download | chromium_src-5e8d27087b478de2d7136fa9016c4e178e19305e.zip chromium_src-5e8d27087b478de2d7136fa9016c4e178e19305e.tar.gz chromium_src-5e8d27087b478de2d7136fa9016c4e178e19305e.tar.bz2 |
Workaround for menu crash.
I don't fully understand how this can happen because handler should not exist
if handler_id is 0. There may be some undocumented behavior in gtk.
I couldn't reproduce this on my machine either (but i've seen on tester's machine) so this is hypothetical workaround
that should fix this.
BUG=chromium-os:15212
TEST=see bug for reprostep
Review URL: http://codereview.chromium.org/7013058
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85346 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views')
-rw-r--r-- | views/controls/menu/native_menu_gtk.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/views/controls/menu/native_menu_gtk.cc b/views/controls/menu/native_menu_gtk.cc index 635909b..b04d3bc9 100644 --- a/views/controls/menu/native_menu_gtk.cc +++ b/views/controls/menu/native_menu_gtk.cc @@ -345,11 +345,13 @@ void NativeMenuGtk::AfterMenuMoveCurrent(GtkWidget* menu_widget, gboolean NativeMenuGtk::OnExpose(GtkWidget* widget, GdkEventExpose* event) { GtkWidget* popup_window = gtk_widget_get_ancestor(menu_, GTK_TYPE_WINDOW); CHECK(popup_window); - CHECK(expose_handler_id_); + DCHECK(expose_handler_id_); WidgetGtk::UpdateFreezeUpdatesProperty(GTK_WINDOW(popup_window), false /* remove */); - g_signal_handler_disconnect(menu_, expose_handler_id_); - expose_handler_id_ = 0; + if (expose_handler_id_) { + g_signal_handler_disconnect(menu_, expose_handler_id_); + expose_handler_id_ = 0; + } return false; } |