1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-03 07:05:24 +02:00

[188425] check for null selection before attempting to open dialog

This commit is contained in:
David McKnight 2007-05-23 13:25:49 +00:00
parent 572a213485
commit 7edc93c3d8

View file

@ -164,8 +164,9 @@ public class SystemCommonRenameAction extends SystemBaseDialogAction
*/
protected Dialog createDialog(Shell parent)
{
IStructuredSelection sel = getSelection();
// multi-select
if (getSelection().size() > 1)
if (sel != null && sel.size() > 1)
{
SystemRenameDialog dlg = new SystemRenameDialog(parent);
if (nameValidator != null)
@ -177,7 +178,7 @@ public class SystemCommonRenameAction extends SystemBaseDialogAction
return dlg;
}
// single-select
else if (getSelection().size() == 1)
else if (sel != null && sel.size() == 1)
{
SystemRenameSingleDialog dlg = new SystemRenameSingleDialog(parent);
if (copyCollisionMode)