diff --git a/Telegram/SourceFiles/boxes/send_files_box.cpp b/Telegram/SourceFiles/boxes/send_files_box.cpp index 487a33007b..58ed48001e 100644 --- a/Telegram/SourceFiles/boxes/send_files_box.cpp +++ b/Telegram/SourceFiles/boxes/send_files_box.cpp @@ -128,6 +128,9 @@ void RenameFileBox( rpl::single(QString()), currentName)); const auto extension = [&] { + if (currentName.isEmpty()) { + return u".png"_q; + } const auto dot = currentName.lastIndexOf('.'); return (dot >= 0) ? currentName.mid(dot) : QString(); }();