diff options
author | apatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-20 18:57:07 +0000 |
---|---|---|
committer | apatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-20 18:57:07 +0000 |
commit | b60ca9929377a9b45776f40e7467e1ed9846d04b (patch) | |
tree | a356e59971fa70e6d60506d94d9b26003f0eec74 /chrome/gpu | |
parent | 9150291ada22937b7df835dd0e4c12f2d198c370 (diff) | |
download | chromium_src-b60ca9929377a9b45776f40e7467e1ed9846d04b.zip chromium_src-b60ca9929377a9b45776f40e7467e1ed9846d04b.tar.gz chromium_src-b60ca9929377a9b45776f40e7467e1ed9846d04b.tar.bz2 |
Fixed crash when ANGLE returns a NULL device.
ANGLE shouldn't be returning a NULL device at this point. I'll get to that next. This will fix crashes for people using old DX8 cards.
TEST=try
BUG=none
Review URL: http://codereview.chromium.org/3410018
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59951 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/gpu')
-rw-r--r-- | chrome/gpu/gpu_info_collector_win.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/chrome/gpu/gpu_info_collector_win.cc b/chrome/gpu/gpu_info_collector_win.cc index d741fe4..1e3124b 100644 --- a/chrome/gpu/gpu_info_collector_win.cc +++ b/chrome/gpu/gpu_info_collector_win.cc @@ -26,7 +26,13 @@ bool CollectGraphicsInfo(GPUInfo* gpu_info) { egl::Display* display = static_cast<egl::Display*>( gfx::BaseEGLContext::GetDisplay()); + if (!display) + return false; + IDirect3DDevice9* device = display->getDevice(); + if (!device) + return false; + IDirect3D9* d3d = NULL; if (FAILED(device->GetDirect3D(&d3d))) return false; |