Don't build the context menu before checking for NULL. Fixes CID 1077, though
the Tracker sources should really be cleaned up to use nothrow and/or exception handling more consistently. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27504 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
7aafe66984
commit
f679edb6e4
@ -1242,8 +1242,8 @@ AttributeView::MouseDown(BPoint point)
|
|||||||
if (((modifiers() & B_CONTROL_KEY) != 0) || (buttons & B_SECONDARY_MOUSE_BUTTON) != 0) {
|
if (((modifiers() & B_CONTROL_KEY) != 0) || (buttons & B_SECONDARY_MOUSE_BUTTON) != 0) {
|
||||||
// Show contextual menu
|
// Show contextual menu
|
||||||
BPopUpMenu *contextMenu = new BPopUpMenu("FileContext", false, false);
|
BPopUpMenu *contextMenu = new BPopUpMenu("FileContext", false, false);
|
||||||
BuildContextMenu(contextMenu);
|
|
||||||
if (contextMenu) {
|
if (contextMenu) {
|
||||||
|
BuildContextMenu(contextMenu);
|
||||||
contextMenu->SetAsyncAutoDestruct(true);
|
contextMenu->SetAsyncAutoDestruct(true);
|
||||||
contextMenu->Go(ConvertToScreen(point), true, true, ConvertToScreen(fIconRect));
|
contextMenu->Go(ConvertToScreen(point), true, true, ConvertToScreen(fIconRect));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user