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:
parent
572a213485
commit
7edc93c3d8
1 changed files with 3 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue