Diffusion GpgOL 8455a9ec1d3d

Fix potential crash on close

Authored by aheinecke on Dec 20 2019, 1:04 PM.


Fix potential crash on close

* src/mail.cpp (Mail::closeAllMails_o): Check if
Mail is still valid after inspector close.

If Outlook holds no other references to a Mail e.g. if it
is opened in its own window (inspector) and the view in the
message list is disabled it can be enough to delete the
mail object to close the inspector.

In that case we still caled "mail->close" on an object
which was already deleted.