From 69fc9fb7fc3e1b9140c352414e5fb9f305cde92d Mon Sep 17 00:00:00 2001 From: jp9000 Date: Tue, 14 Oct 2014 01:44:59 -0700 Subject: [PATCH] Free graphics subsystem if graphics fails to load The graphics subsystem was not being freed here, for example if a required effect failed to compile it would still successfully have the graphics subsystem sans required effect. The graphics subsystem should be completely shut down if required libobs effects fail to compile. --- libobs/obs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libobs/obs.c b/libobs/obs.c index d56188058..5a41a5562 100644 --- a/libobs/obs.c +++ b/libobs/obs.c @@ -671,8 +671,10 @@ int obs_reset_video(struct obs_video_info *ovi) if (!video->graphics) { int errorcode = obs_init_graphics(ovi); - if (errorcode != OBS_VIDEO_SUCCESS) + if (errorcode != OBS_VIDEO_SUCCESS) { + obs_free_graphics(); return errorcode; + } } blog(LOG_INFO, "video settings reset:\n"