Skip to content

Commit

Permalink
Refs #11094 Resolve Coverity issues in deleteSelectedItems
Browse files Browse the repository at this point in the history
  • Loading branch information
Harry Jeffery committed Feb 16, 2015
1 parent 604db70 commit 331b218
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions Code/Mantid/MantidPlot/src/ApplicationWindow.cpp
Expand Up @@ -9868,11 +9868,17 @@ void ApplicationWindow::deleteSelectedItems()
folders->blockSignals(true);
foreach(item, lst){
if (item->rtti() == FolderListItem::RTTI){
Folder *f = dynamic_cast<FolderListItem*>(item)->folder();
auto fli = dynamic_cast<FolderListItem*>(item);
if(!fli)
continue;
Folder *f = fli->folder();
if (deleteFolder(f))
delete item;
} else
dynamic_cast<WindowListItem*>(item)->window()->close();
} else {
auto wli = dynamic_cast<WindowListItem*>(item);
if(wli)
wli->window()->close();
}
}
folders->blockSignals(false);
}
Expand Down

0 comments on commit 331b218

Please sign in to comment.