The branch, master, has been updated. - Log -----------------------------------------------------------------
commit 0a33374c0d8125e27666fe513506fb6069df453c Author: Vincent van Ravesteijn <v...@lyx.org> Date: Wed May 23 01:31:43 2012 +0200 Fix bug #8166: Crash on clicking away from empty paragraph We rely on the 'or' operator to prevent us from calling 'notifyCursorLeaves' if one of the two cursors is broken. This doesn't work when using the '|' operator. The compiler 'optimizes' the code in such a way that we always call notifyCursorLeaves anyway. Using the '||' operator fixes this. diff --git a/src/BufferView.cpp b/src/BufferView.cpp index a30c0f0..1017cea 100644 --- a/src/BufferView.cpp +++ b/src/BufferView.cpp @@ -2201,8 +2201,8 @@ void BufferView::mouseEventDispatch(FuncRequest const & cmd0) // Notify left insets if (cur != old) { - bool badcursor = old.fixIfBroken() | cur.fixIfBroken() - | notifyCursorLeavesOrEnters(old, cur); + bool badcursor = old.fixIfBroken() || cur.fixIfBroken() + || notifyCursorLeavesOrEnters(old, cur); if (badcursor) cursor().fixIfBroken(); } ----------------------------------------------------------------------- Summary of changes: src/BufferView.cpp | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- The LyX Source Repository