mirror of
https://github.com/Xaymar/obs-StreamFX
synced 2024-12-29 11:01:23 +00:00
gfx-source-texture: Check for valid child and parent
This commit is contained in:
parent
6d25342302
commit
e4a5b34745
1 changed files with 3 additions and 0 deletions
|
@ -114,6 +114,9 @@ std::shared_ptr<gs::texture> gfx::source_texture::render(size_t width, size_t he
|
|||
if ((height == 0) || (height >= 16384)) {
|
||||
throw std::runtime_error("Height too large or too small.");
|
||||
}
|
||||
if (child->destroyed() || parent->destroyed()) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
{
|
||||
auto op = render_target->render((uint32_t)width, (uint32_t)height);
|
||||
|
|
Loading…
Reference in a new issue