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)
|
2739 | 2739 | && (fColumnFlags & B_ALLOW_COLUMN_RESIZE) != 0) { |
2740 | 2740 | |
2741 | 2741 | int32 clicks = 0; |
| 2742 | fSelectedColumn = column; |
| 2743 | fSelectedColumnRect.Set(leftEdge, 0, rightEdge, |
| 2744 | fVisibleRect.Height()); |
2742 | 2745 | Window()->CurrentMessage()->FindInt32("clicks", &clicks); |
2743 | 2746 | if (clicks == 2 || buttons == B_TERTIARY_MOUSE_BUTTON) { |
2744 | 2747 | ResizeSelectedColumn(position, true); |
… |
… |
TitleView::MouseDown(BPoint position)
|
2746 | 2749 | break; |
2747 | 2750 | } |
2748 | 2751 | fCurrentState = RESIZING_COLUMN; |
2749 | | fSelectedColumn = column; |
2750 | | fSelectedColumnRect.Set(leftEdge, 0, rightEdge, |
2751 | | fVisibleRect.Height()); |
2752 | 2752 | fClickPoint = BPoint(position.x - rightEdge - 1, |
2753 | 2753 | position.y - fSelectedColumnRect.top); |
2754 | 2754 | SetMouseEventMask(B_POINTER_EVENTS, |