From b8524966033ae5ff8191215d6712327bc3567e26 Mon Sep 17 00:00:00 2001 From: "[CST] Focus" Date: Wed, 1 Oct 2014 12:56:12 +0400 Subject: [PATCH] gui/movieplayer.cpp: check file name is not url before save screenshot --- src/gui/movieplayer.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/gui/movieplayer.cpp b/src/gui/movieplayer.cpp index 9824a8eca..22bef8e57 100644 --- a/src/gui/movieplayer.cpp +++ b/src/gui/movieplayer.cpp @@ -1973,6 +1973,13 @@ void CMoviePlayerGui::makeScreenShot(bool autoshot, bool forcover) if (p_movie_info) fname = p_movie_info->file.Name; + /* quick check we have file and not url as file name */ + if (fname.c_str()[0] != '/') { + if (autoshot) + autoshot_done = true; + return; + } + std::string::size_type pos = fname.find_last_of('.'); if (pos != std::string::npos) { fname.replace(pos, fname.length(), ending);