Chromium Code Reviews| Index: content/renderer/image_downloader/image_downloader_impl.cc |
| diff --git a/content/renderer/image_downloader/image_downloader_impl.cc b/content/renderer/image_downloader/image_downloader_impl.cc |
| index ac4995a2fec9d3343a410706ee1635a4c103f67d..31e9c51fd271c588ec34db957b8f2e4f78d585ea 100644 |
| --- a/content/renderer/image_downloader/image_downloader_impl.cc |
| +++ b/content/renderer/image_downloader/image_downloader_impl.cc |
| @@ -130,7 +130,9 @@ ImageDownloaderImpl::ImageDownloaderImpl( |
| } |
| ImageDownloaderImpl::~ImageDownloaderImpl() { |
| - RenderThread::Get()->RemoveObserver(this); |
| + RenderThread* thread = RenderThread::Get(); |
| + if (thread) |
|
yzshen1
2016/08/26 19:20:31
Please comment on why this null check is necessary
leonhsl(Using Gerrit)
2016/08/29 02:17:30
Done and thanks.
|
| + thread->RemoveObserver(this); |
| } |
| // static |