summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gtk/tabs/dragged_tab_gtk.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/gtk/tabs/dragged_tab_gtk.cc')
-rw-r--r--chrome/browser/gtk/tabs/dragged_tab_gtk.cc8
1 files changed, 3 insertions, 5 deletions
diff --git a/chrome/browser/gtk/tabs/dragged_tab_gtk.cc b/chrome/browser/gtk/tabs/dragged_tab_gtk.cc
index b91cf7b..9a25ca9 100644
--- a/chrome/browser/gtk/tabs/dragged_tab_gtk.cc
+++ b/chrome/browser/gtk/tabs/dragged_tab_gtk.cc
@@ -287,11 +287,9 @@ void DraggedTabGtk::PaintScreenshotIntoCanvas(gfx::Canvas* canvas,
const gfx::Rect& target_bounds) {
gfx::Rect rect(0, 0,
contents_->allocation.width, contents_->allocation.height);
- SkBitmap* bitmap = backing_store_->PaintRectToBitmap(rect);
- if (bitmap) {
- canvas->DrawBitmapInt(*bitmap, 0, renderer_->bounds().height());
- delete bitmap;
- }
+ SkBitmap bitmap = backing_store_->PaintRectToBitmap(rect);
+ if (!bitmap.isNull())
+ canvas->DrawBitmapInt(bitmap, 0, renderer_->bounds().height());
}
// static