From: Guillaume Munch Date: Fri, 10 Mar 2017 21:55:33 +0000 (+0100) Subject: Amend 63be456c8 X-Git-Tag: 2.3.0alpha1~245 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=b034389e6def020d5201d59f6bab901453c3b5af;p=features.git Amend 63be456c8 Fix crash when clicking on math previews --- diff --git a/src/Cursor.cpp b/src/Cursor.cpp index 2de42ba8ad..758cef9a77 100644 --- a/src/Cursor.cpp +++ b/src/Cursor.cpp @@ -2443,6 +2443,8 @@ void Cursor::moveToClosestEdge(int const x, bool const edit) if (edit && (inset->hasSettings() || !inset->contextMenuName().empty())) return; CoordCache::Insets const & insetCache = bv().coordCache().getInsets(); + if (!insetCache.has(inset)) + return; int const wid = insetCache.dim(inset).wid; Point p = insetCache.xy(inset); if (x > p.x_ + (wid + 1) / 2)