Commit 35f7ef81 by Frank Henigman Committed by Commit Bot

Ozone null pointer checks.

Check for null pointers so DisplayOzone::terminate() doesn't crash when DisplayOzone::initialize() wasn't completely successful. BUG=angleproject:1419 Change-Id: I70e994490a7282083d5289e6c35b077676688b65 Reviewed-on: https://chromium-review.googlesource.com/354700Reviewed-by: 's avatarYuly Novikov <ynovikov@chromium.org> Reviewed-by: 's avatarCorentin Wallez <cwallez@chromium.org> Commit-Queue: Frank Henigman <fjhenigman@chromium.org>
parent e064d44b
...@@ -811,14 +811,21 @@ void DisplayOzone::terminate() ...@@ -811,14 +811,21 @@ void DisplayOzone::terminate()
SafeDelete(mFunctionsGL); SafeDelete(mFunctionsGL);
mEGL->terminate(); if (mEGL)
SafeDelete(mEGL); {
mEGL->terminate();
SafeDelete(mEGL);
}
drmModeFreeCrtc(mCRTC); drmModeFreeCrtc(mCRTC);
int fd = gbm_device_get_fd(mGBM); if (mGBM)
gbm_device_destroy(mGBM); {
close(fd); int fd = gbm_device_get_fd(mGBM);
gbm_device_destroy(mGBM);
mGBM = nullptr;
close(fd);
}
} }
SurfaceImpl *DisplayOzone::createWindowSurface(const egl::SurfaceState &state, SurfaceImpl *DisplayOzone::createWindowSurface(const egl::SurfaceState &state,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment