fixed NPE when parent in selection dialog is null