Author: czeidler Date: 2011-03-05 01:18:25 +0100 (Sat, 05 Mar 2011) New Revision: 40812 Changeset: http://dev.haiku-os.org/changeset/40812 Modified: haiku/trunk/src/apps/mail/MailWindow.cpp Log: Fix crash when opening a new mail. Thanks Jonas. Modified: haiku/trunk/src/apps/mail/MailWindow.cpp =================================================================== --- haiku/trunk/src/apps/mail/MailWindow.cpp 2011-03-04 22:34:20 UTC (rev 40811) +++ haiku/trunk/src/apps/mail/MailWindow.cpp 2011-03-05 00:18:25 UTC (rev 40812) @@ -2787,6 +2787,8 @@ status_t TMailWindow::OpenMessage(const entry_ref *ref, uint32 characterSetForDecoding) { + if (ref == NULL) + return B_ERROR; // // Set some references to the email file //