]> git.lyx.org Git - features.git/commitdiff
Amend 63be456c8
authorGuillaume Munch <gm@lyx.org>
Fri, 10 Mar 2017 21:55:33 +0000 (22:55 +0100)
committerGuillaume Munch <gm@lyx.org>
Fri, 10 Mar 2017 23:50:57 +0000 (00:50 +0100)
Fix crash when clicking on math previews

src/Cursor.cpp

index 2de42ba8ad63967584dfb40084446132ab7a90c2..758cef9a77e9ec51fcfe28cd046492f4b6d0c004 100644 (file)
@@ -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)