mirror of
https://github.com/vale981/tdesktop
synced 2025-03-06 10:11:41 -05:00
crash on close fixed
This commit is contained in:
parent
9a3489694e
commit
43e173567f
3 changed files with 7 additions and 4 deletions
|
@ -202,7 +202,7 @@ namespace App {
|
|||
globalNotifyAllPtr = UnknownNotifySettings;
|
||||
globalNotifyUsersPtr = UnknownNotifySettings;
|
||||
globalNotifyChatsPtr = UnknownNotifySettings;
|
||||
App::uploader()->clear();
|
||||
if (App::uploader()) App::uploader()->clear();
|
||||
clearStorageImages();
|
||||
if (w) {
|
||||
w->getTitle()->updateBackButton();
|
||||
|
|
|
@ -489,7 +489,7 @@ int32 Application::updatingReady() {
|
|||
#endif
|
||||
|
||||
FileUploader *Application::uploader() {
|
||||
if (!::uploader) ::uploader = new FileUploader();
|
||||
if (!::uploader && !App::quiting()) ::uploader = new FileUploader();
|
||||
return ::uploader;
|
||||
}
|
||||
|
||||
|
@ -878,6 +878,7 @@ void Application::closeApplication() {
|
|||
|
||||
Application::~Application() {
|
||||
App::setQuiting();
|
||||
|
||||
window->setParent(0);
|
||||
|
||||
anim::stopManager();
|
||||
|
@ -886,8 +887,10 @@ Application::~Application() {
|
|||
closeApplication();
|
||||
App::deinitMedia();
|
||||
deinitImageLinkManager();
|
||||
|
||||
mainApp = 0;
|
||||
delete ::uploader;
|
||||
|
||||
#ifndef TDESKTOP_DISABLE_AUTOUPDATE
|
||||
delete updateReply;
|
||||
updateReply = 0;
|
||||
|
|
|
@ -2968,8 +2968,8 @@ void HistoryItem::setId(MsgId newId) {
|
|||
|
||||
HistoryItem::~HistoryItem() {
|
||||
App::historyUnregItem(this);
|
||||
if (id < 0) {
|
||||
App::app()->uploader()->cancel(fullId());
|
||||
if (id < 0 && App::uploader()) {
|
||||
App::uploader()->cancel(fullId());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue