mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-09-04 08:25:38 +00:00
crash on close fixed
This commit is contained in:
@@ -202,7 +202,7 @@ namespace App {
|
|||||||
globalNotifyAllPtr = UnknownNotifySettings;
|
globalNotifyAllPtr = UnknownNotifySettings;
|
||||||
globalNotifyUsersPtr = UnknownNotifySettings;
|
globalNotifyUsersPtr = UnknownNotifySettings;
|
||||||
globalNotifyChatsPtr = UnknownNotifySettings;
|
globalNotifyChatsPtr = UnknownNotifySettings;
|
||||||
App::uploader()->clear();
|
if (App::uploader()) App::uploader()->clear();
|
||||||
clearStorageImages();
|
clearStorageImages();
|
||||||
if (w) {
|
if (w) {
|
||||||
w->getTitle()->updateBackButton();
|
w->getTitle()->updateBackButton();
|
||||||
|
@@ -489,7 +489,7 @@ int32 Application::updatingReady() {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
FileUploader *Application::uploader() {
|
FileUploader *Application::uploader() {
|
||||||
if (!::uploader) ::uploader = new FileUploader();
|
if (!::uploader && !App::quiting()) ::uploader = new FileUploader();
|
||||||
return ::uploader;
|
return ::uploader;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -878,6 +878,7 @@ void Application::closeApplication() {
|
|||||||
|
|
||||||
Application::~Application() {
|
Application::~Application() {
|
||||||
App::setQuiting();
|
App::setQuiting();
|
||||||
|
|
||||||
window->setParent(0);
|
window->setParent(0);
|
||||||
|
|
||||||
anim::stopManager();
|
anim::stopManager();
|
||||||
@@ -886,8 +887,10 @@ Application::~Application() {
|
|||||||
closeApplication();
|
closeApplication();
|
||||||
App::deinitMedia();
|
App::deinitMedia();
|
||||||
deinitImageLinkManager();
|
deinitImageLinkManager();
|
||||||
|
|
||||||
mainApp = 0;
|
mainApp = 0;
|
||||||
delete ::uploader;
|
delete ::uploader;
|
||||||
|
|
||||||
#ifndef TDESKTOP_DISABLE_AUTOUPDATE
|
#ifndef TDESKTOP_DISABLE_AUTOUPDATE
|
||||||
delete updateReply;
|
delete updateReply;
|
||||||
updateReply = 0;
|
updateReply = 0;
|
||||||
|
@@ -2968,8 +2968,8 @@ void HistoryItem::setId(MsgId newId) {
|
|||||||
|
|
||||||
HistoryItem::~HistoryItem() {
|
HistoryItem::~HistoryItem() {
|
||||||
App::historyUnregItem(this);
|
App::historyUnregItem(this);
|
||||||
if (id < 0) {
|
if (id < 0 && App::uploader()) {
|
||||||
App::app()->uploader()->cancel(fullId());
|
App::uploader()->cancel(fullId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user