TabBar: fixed crashing issue (thanks Klugier)

git-svn-id: svn://ultimatepp.org/upp/trunk@6262 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2013-08-25 08:38:29 +00:00
parent b52a789fdd
commit a14448f3f4

View file

@ -1922,14 +1922,19 @@ void TabBar::LeftDown(Point p, dword keyflags)
return;
if(cross != -1) {
Value v = tabs[cross].key;
Vector<Value>vv;
vv.Add(v);
int ix = cross;
if (!CancelClose(v) && !CancelCloseSome(Vector<Value>(vv, 0))) {
Close(ix);
WhenClose(v);
WhenCloseSome(vv);
if (cross < tabs.GetCount()) {
int tempCross = cross;
Value v = tabs[cross].key;
Vector<Value>vv;
vv.Add(v);
int ix = cross;
if (!CancelClose(v) && !CancelCloseSome(Vector<Value>(vv, 0))) {
Close(ix);
WhenClose(v);
WhenCloseSome(vv);
}
if (tempCross >= 0 && tempCross < tabs.GetCount())
ProcessMouse(tempCross, p);
}
}
else if(highlight >= 0) {