Index: chrome/renderer/print_web_view_helper_win.cc |
diff --git a/chrome/renderer/print_web_view_helper_win.cc b/chrome/renderer/print_web_view_helper_win.cc |
index 9cd72ece67ff9817f5dae4897f8cb6dcdcbcde7a..edaaf8f27391e391fcf20501d54811b80d14c7f6 100644 |
--- a/chrome/renderer/print_web_view_helper_win.cc |
+++ b/chrome/renderer/print_web_view_helper_win.cc |
@@ -140,12 +140,12 @@ void PrintWebViewHelper::RenderPreviewPage(int page_number) { |
// Release since |print_preview_context_| is the real owner. |
metafile.release(); |
- printing::Metafile* page_metafile = NULL; |
+ scoped_ptr<printing::Metafile> page_metafile; |
if (print_preview_context_.IsModifiable()) { |
- page_metafile = reinterpret_cast<printing::PreviewMetafile*>( |
- print_preview_context_.metafile())->GetMetafileForCurrentPage(); |
+ page_metafile.reset(reinterpret_cast<printing::PreviewMetafile*>( |
+ print_preview_context_.metafile())->GetMetafileForCurrentPage()); |
} |
- PreviewPageRendered(page_number, page_metafile); |
+ PreviewPageRendered(page_number, page_metafile.get()); |
} |
void PrintWebViewHelper::RenderPage( |