Hi, When I try to open http://people.freedesktop.org/~vmiklos/math.word2007.docx on master (with experimanl features disabled, so the inline formula editor is disabled), double-click on the math formula, Math opens, finally I click on the formula, Math crashes. The attached patch fixes the problem here, but I'm sending it for review as I'm totally unfamiliar with the starmath code - in case my patch would just hide a deeper problem. Thanks.
From 49d79671d9c7d69d80ec1fde7283ae74a1580ca0 Mon Sep 17 00:00:00 2001
From: Miklos Vajna <vmiklos@frugalware.org>
Date: Thu, 14 Jul 2011 16:44:32 +0200
Subject: [PATCH] starmath: check for existing edit window
---
starmath/source/view.cxx | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index 79bfd82..b3d77ff 100644
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -195,6 +195,8 @@ void SmGraphicWindow::MouseButtonDown(const MouseEvent& rMEvt)
if (pNode)
{ SmEditWindow *pEdit = pViewShell->GetEditWindow();
+ if (!pEdit)
+ return;
const SmToken aToken (pNode->GetToken());
// set selection to the beginning of the token
--
1.7.6
Attachment:
pgpJDSrIURG_U.pgp
Description: PGP signature