From cf69f24917fc8859f0b1ef7cb6607036ce174734 Mon Sep 17 00:00:00 2001 From: Palana Date: Wed, 16 Sep 2015 16:20:17 +0200 Subject: [PATCH] UI: Fix crash when saving advanced FFmpeg output Selecting any supported FFmpeg format where ff_format_desc_extensions returns NULL would crash the std::string constructor, so we pass an empty extension instead (rtsp is one candidate format that triggers the crash, on my machine at least) --- obs/window-basic-settings.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/obs/window-basic-settings.cpp b/obs/window-basic-settings.cpp index 93649f346..c4446f081 100644 --- a/obs/window-basic-settings.cpp +++ b/obs/window-basic-settings.cpp @@ -2034,7 +2034,7 @@ void OBSBasicSettings::SaveFormat(QComboBox *combo) desc.mimeType); const char *ext = ff_format_desc_extensions(desc.desc); - string extStr = ext; + string extStr = ext ? ext : ""; char *comma = strchr(&extStr[0], ','); if (comma)