diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-19 03:37:00 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-19 03:37:00 +0000 |
commit | 9513f20493f07ab43d68ccb55fa321086bf955b3 (patch) | |
tree | 82c91d40127cc72266edef46812b3f71a2ff4bc8 /views | |
parent | 134c47b9e74ab7aa6dce7e1beeaf5e406a925b76 (diff) | |
download | chromium_src-9513f20493f07ab43d68ccb55fa321086bf955b3.zip chromium_src-9513f20493f07ab43d68ccb55fa321086bf955b3.tar.gz chromium_src-9513f20493f07ab43d68ccb55fa321086bf955b3.tar.bz2 |
Makes Path::CreateGdkRegion return NULL for empty paths. Without this
gdk_region_polygon asserts. And adds the null check in WindowGtk.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/164441
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23691 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views')
-rw-r--r-- | views/window/window_gtk.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/views/window/window_gtk.cc b/views/window/window_gtk.cc index 11c2a77..1643e1b 100644 --- a/views/window/window_gtk.cc +++ b/views/window/window_gtk.cc @@ -315,7 +315,10 @@ void WindowGtk::OnSizeAllocate(GtkWidget* widget, GtkAllocation* allocation) { &window_mask); GdkRegion* mask_region = window_mask.CreateGdkRegion(); gdk_window_shape_combine_region(GetNativeView()->window, mask_region, 0, 0); - gdk_region_destroy(mask_region); + if (mask_region) + gdk_region_destroy(mask_region); + + SaveWindowPosition(); } gboolean WindowGtk::OnWindowStateEvent(GtkWidget* widget, |