Ticket #10439: 0001-Fix-10439.-Avoid-crash-on-calling-ResizeSelectedColu.patch

File 0001-Fix-10439.-Avoid-crash-on-calling-ResizeSelectedColu.patch, 1.3 KB (added by Janus, 10 years ago)
  • src/kits/interface/ColumnListView.cpp

    From ab7f5803cef6c5bf09c64ed8acb68bcab8068a77 Mon Sep 17 00:00:00 2001
    From: Janus <janus2@ymail.com>
    Date: Thu, 2 Apr 2015 17:22:56 +0000
    Subject: [PATCH] Fix #10439. Avoid crash on calling ResizeSelectedColumn with
     fSelectedColumn uninizialized
    
    ---
     src/kits/interface/ColumnListView.cpp | 6 +++---
     1 file changed, 3 insertions(+), 3 deletions(-)
    
    diff --git a/src/kits/interface/ColumnListView.cpp b/src/kits/interface/ColumnListView.cpp
    index e7c49c1..5d4400c 100644
    a b TitleView::MouseDown(BPoint position)  
    27392739                && (fColumnFlags & B_ALLOW_COLUMN_RESIZE) != 0) {
    27402740
    27412741                int32 clicks = 0;
     2742                fSelectedColumn = column;
     2743                fSelectedColumnRect.Set(leftEdge, 0, rightEdge,
     2744                    fVisibleRect.Height());
    27422745                Window()->CurrentMessage()->FindInt32("clicks", &clicks);
    27432746                if (clicks == 2 || buttons == B_TERTIARY_MOUSE_BUTTON) {
    27442747                    ResizeSelectedColumn(position, true);
    TitleView::MouseDown(BPoint position)  
    27462749                    break;
    27472750                }
    27482751                fCurrentState = RESIZING_COLUMN;
    2749                 fSelectedColumn = column;
    2750                 fSelectedColumnRect.Set(leftEdge, 0, rightEdge,
    2751                     fVisibleRect.Height());
    27522752                fClickPoint = BPoint(position.x - rightEdge - 1,
    27532753                    position.y - fSelectedColumnRect.top);
    27542754                SetMouseEventMask(B_POINTER_EVENTS,