libobs: Check return value from obs_scene_add_internal
Errors in obs_scene_add_internal would cause a crash as the null item is passed to various signal handlers.
This commit is contained in:
parent
2131a8b243
commit
4dfb572547
@ -1753,6 +1753,9 @@ obs_sceneitem_t *obs_scene_add(obs_scene_t *scene, obs_source_t *source)
|
||||
struct calldata params;
|
||||
uint8_t stack[128];
|
||||
|
||||
if (!item)
|
||||
return NULL;
|
||||
|
||||
calldata_init_fixed(¶ms, stack, sizeof(stack));
|
||||
calldata_set_ptr(¶ms, "scene", scene);
|
||||
calldata_set_ptr(¶ms, "item", item);
|
||||
|
Loading…
x
Reference in New Issue
Block a user