mirror of https://github.com/zlatinb/muwire
fix npe if nothing is selected
parent
fef73f14ab
commit
3efee7ef68
|
@ -1496,7 +1496,7 @@ class MainFrameView {
|
|||
if (model.treeVisible) {
|
||||
def sharedFilesTree = builder.getVariable("shared-files-tree")
|
||||
TreePath[] selected = sharedFilesTree.getSelectionPaths()
|
||||
if (selected.length != 1)
|
||||
if (selected == null || selected.length != 1)
|
||||
return null
|
||||
Object o = selected[0].getLastPathComponent().getUserObject()
|
||||
if (o instanceof SharedFile)
|
||||
|
|
Loading…
Reference in New Issue