]> git.lyx.org Git - features.git/commitdiff
Fix bug 3142 (LyX crashes when using mouse wheel)
authorAbdelrazak Younes <younes@lyx.org>
Mon, 29 Jan 2007 10:04:02 +0000 (10:04 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Mon, 29 Jan 2007 10:04:02 +0000 (10:04 +0000)
http://bugzilla.lyx.org/show_bug.cgi?id=3142

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16925 a592a061-630c-0410-9148-cb99ea01b6c8

src/BufferView.C

index acd74c38f083aeb6f52163419946a5911266d72b..d6bba3eb7add4306562652c10bbdd82ec24f70f1 100644 (file)
@@ -502,6 +502,9 @@ void BufferView::scrollDocView(int value)
 
 void BufferView::setCursorFromScrollbar()
 {
+       if (!buffer)
+               return;
+
        LyXText & t = buffer_->text();
 
        int const height = 2 * defaultRowHeight();