Try to fix crashes in MAPI SubmitMessage path
authorAndre Heinecke <aheinecke@intevation.de>
Thu, 6 Sep 2018 15:21:55 +0000 (17:21 +0200)
committerAndre Heinecke <aheinecke@intevation.de>
Thu, 6 Sep 2018 15:21:55 +0000 (17:21 +0200)
* src/windowmessages.cpp (gpgol_window_proc): Close inspector
before closing the mail.

--
This is purely experimental programming. The SubmitMessage paths
both lead to random crashes. So I tried around what might
be the cause and found this. Let's hope it is not just luck
that it currently does not crash for me.

GnuPG-Bug-Id: T4131

src/windowmessages.cpp

index 25c5dcd..9991eba 100644 (file)
@@ -133,6 +133,8 @@ gpgol_window_proc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
                   break;
                 }
               mail->refCurrentItem();
+              Mail::closeInspector_o (mail);
+              TRACEPOINT;
               Mail::close (mail);
               log_debug ("%s:%s: Close finished.",
                          SRCNAME, __func__);