linux-capture: Fix crash on missing texture
Add a check to the cursor render function to ensure the cursor texture exists. It seems like it is very unlikely but still possible, that the first tick which should set the texture might fail. In that case obs would crash in the render function.
This commit is contained in:
@@ -99,6 +99,9 @@ void xcursor_tick(xcursor_t *data) {
|
||||
}
|
||||
|
||||
void xcursor_render(xcursor_t *data) {
|
||||
if (!data->tex)
|
||||
return;
|
||||
|
||||
gs_effect_t *effect = gs_get_effect();
|
||||
gs_eparam_t *image = gs_effect_get_param_by_name(effect, "image");
|
||||
gs_effect_set_texture(image, data->tex);
|
||||
|
Reference in New Issue
Block a user