Fix potentially dereferenced null pointer

This commit is contained in:
jp9000
2014-07-13 05:01:53 -07:00
parent 413641a11f
commit dde9caface

View File

@@ -607,10 +607,6 @@ bool obs_reset_video(struct obs_video_info *ovi)
struct obs_core_video *video = &obs->video;
/* align to multiple-of-two and SSE alignment sizes */
ovi->output_width &= 0xFFFFFFFC;
ovi->output_height &= 0xFFFFFFFE;
stop_video();
obs_free_video();
@@ -619,6 +615,10 @@ bool obs_reset_video(struct obs_video_info *ovi)
return true;
}
/* align to multiple-of-two and SSE alignment sizes */
ovi->output_width &= 0xFFFFFFFC;
ovi->output_height &= 0xFFFFFFFE;
if (!video->graphics && !obs_init_graphics(ovi))
return false;