From 864515f3a32c4df83c477281468434a4f0a54a33 Mon Sep 17 00:00:00 2001 From: Georg Baum Date: Wed, 27 Sep 2006 16:10:47 +0000 Subject: [PATCH] avoid comparing the addresses of dereferenced 0 pointers git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15172 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/cursor_slice.C | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cursor_slice.C b/src/cursor_slice.C index 145dcace3b..b23d2da4a0 100644 --- a/src/cursor_slice.C +++ b/src/cursor_slice.C @@ -79,7 +79,7 @@ CursorSlice::col_type CursorSlice::col() const bool operator==(CursorSlice const & p, CursorSlice const & q) { - return &p.inset() == &q.inset() + return p.inset_ == q.inset_ && p.idx() == q.idx() && p.pit() == q.pit() && p.pos() == q.pos(); @@ -88,7 +88,7 @@ bool operator==(CursorSlice const & p, CursorSlice const & q) bool operator!=(CursorSlice const & p, CursorSlice const & q) { - return &p.inset() != &q.inset() + return p.inset_ != q.inset_ || p.idx() != q.idx() || p.pit() != q.pit() || p.pos() != q.pos(); -- 2.39.2