libobs-d3d11: Remove possible null pointer dereference
parent
bd5de5d938
commit
f6fae9b7e9
|
@ -2050,6 +2050,9 @@ extern "C" EXPORT void *gs_texture_get_dc(gs_texture_t *tex)
|
|||
if (!TextureGDICompatible(tex2d, "gs_texture_get_dc"))
|
||||
return nullptr;
|
||||
|
||||
if (!tex2d->gdiSurface)
|
||||
return nullptr;
|
||||
|
||||
tex2d->gdiSurface->GetDC(true, &hDC);
|
||||
return hDC;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue