Fix couple of possible crashes.

This commit is contained in:
John Preston 2018-05-08 21:06:56 +03:00
parent d2048f3c25
commit c3fc91a6fc
2 changed files with 2 additions and 1 deletions

View File

@ -3751,6 +3751,7 @@ void ApiWrap::uploadAlbumMedia(
const auto item = App::histItemById(localId); const auto item = App::histItemById(localId);
if (!item) { if (!item) {
failed(); failed();
return;
} }
if (const auto media = item->media()) { if (const auto media = item->media()) {
if (const auto photo = media->photo()) { if (const auto photo = media->photo()) {

View File

@ -210,7 +210,7 @@ void EmojiButton::setLoading(bool loading) {
} }
if (loading) { if (loading) {
_loading->start(); _loading->start();
} else { } else if (_loading) {
_loading->stop(); _loading->stop();
} }
} }