diff options
Diffstat (limited to 'app/gfx')
-rw-r--r-- | app/gfx/gtk_util.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/gfx/gtk_util.cc b/app/gfx/gtk_util.cc index 03d0504..98b174b 100644 --- a/app/gfx/gtk_util.cc +++ b/app/gfx/gtk_util.cc @@ -29,7 +29,11 @@ const GdkColor kGdkBlack = GDK_COLOR_RGB(0x00, 0x00, 0x00); const GdkColor kGdkGreen = GDK_COLOR_RGB(0x00, 0xff, 0x00); GdkPixbuf* GdkPixbufFromSkBitmap(const SkBitmap* bitmap) { + if (bitmap->isNull()) + return NULL; + bitmap->lockPixels(); + int width = bitmap->width(); int height = bitmap->height(); int stride = bitmap->rowBytes(); |