Fix crash during download when the main window have been closed

Authored by chcuris on Oct 15 2018, 4:18 PM.

Description

Fix crash during download when the main window have been closed

Summary:
Falkon has a feature to automatically close the tab that was specifically
opened for the file to download, because this kind of tab has no useful
purpose to the user.

In the case where the main window would have been closed, Falkon
would crash de-referencing the now NULL pointer to the main window.

This patch adds a simple check to do nothing in this case, as there is no
tab to close anyway.

Reviewers: Falkon, drosca

Reviewed By: Falkon, drosca

Subscribers: drosca, falkon, Falkon

Tags: Falkon

Differential Revision: https://phabricator.kde.org/D14711

Details