gs-rendertarget: Don't ignore failed creation of render target

This commit is contained in:
Michael Fabian 'Xaymar' Dirks 2019-01-24 00:07:36 +01:00
parent 04ddf76920
commit bf35b54957

View file

@ -45,6 +45,9 @@ gs::rendertarget::rendertarget(gs_color_format colorFormat, gs_zstencil_format z
obs_enter_graphics();
render_target = gs_texrender_create(colorFormat, zsFormat);
obs_leave_graphics();
if (!render_target) {
throw std::runtime_error("Failed to create render target.");
}
}
gs::rendertarget_op gs::rendertarget::render(uint32_t width, uint32_t height)