diff options
Diffstat (limited to 'app/gfx/path_gtk.cc')
-rw-r--r-- | app/gfx/path_gtk.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/gfx/path_gtk.cc b/app/gfx/path_gtk.cc index bc35857..9a2b92c 100644 --- a/app/gfx/path_gtk.cc +++ b/app/gfx/path_gtk.cc @@ -7,11 +7,18 @@ #include <gdk/gdk.h> #include "base/scoped_ptr.h" +#include "base/command_line.h" namespace gfx { GdkRegion* Path::CreateGdkRegion() const { int point_count = getPoints(NULL, 0); + if (point_count <= 1) { + // NOTE: ideally this would return gdk_empty_region, but that returns a + // region with nothing in it. + return NULL; + } + scoped_array<SkPoint> points(new SkPoint[point_count]); getPoints(points.get(), point_count); |