mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1122367: Null check the result of D2DFactory(). r=Bas
This commit is contained in:
parent
739a4dfd9f
commit
421e09c9a8
@ -859,7 +859,12 @@ DrawTargetD2D1::factory()
|
||||
return mFactory;
|
||||
}
|
||||
|
||||
HRESULT hr = D2DFactory()->QueryInterface((ID2D1Factory1**)&mFactory);
|
||||
ID2D1Factory* d2dFactory = D2DFactory();
|
||||
if (!d2dFactory) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
HRESULT hr = d2dFactory->QueryInterface((ID2D1Factory1**)&mFactory);
|
||||
|
||||
if (FAILED(hr)) {
|
||||
return nullptr;
|
||||
|
Loading…
Reference in New Issue
Block a user