Fix NPE on right click with no selected item

Signed-off-by: Ross Allan <rallanpcl@gmail.com>