[Impeller] fix NPE when checking known bad driver. (flutter/engine#54959)
context can be null here which is causing https://github.com/flutter/flutter/issues/154622
This commit is contained in:
@@ -68,7 +68,7 @@ static std::shared_ptr<impeller::Context> CreateImpellerContext(
|
||||
FML_LOG(IMPORTANT) << "Using the Impeller rendering backend (Vulkan).";
|
||||
}
|
||||
}
|
||||
if (context->GetDriverInfo()->IsKnownBadDriver()) {
|
||||
if (context && context->GetDriverInfo()->IsKnownBadDriver()) {
|
||||
FML_LOG(INFO)
|
||||
<< "Known bad Vulkan driver encountered, falling back to OpenGLES.";
|
||||
return nullptr;
|
||||
|
||||
Reference in New Issue
Block a user