mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-29 11:55:40 +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)
|
protected Dialog createDialog(Shell parent)
|
||||||
{
|
{
|
||||||
|
IStructuredSelection sel = getSelection();
|
||||||
// multi-select
|
// multi-select
|
||||||
if (getSelection().size() > 1)
|
if (sel != null && sel.size() > 1)
|
||||||
{
|
{
|
||||||
SystemRenameDialog dlg = new SystemRenameDialog(parent);
|
SystemRenameDialog dlg = new SystemRenameDialog(parent);
|
||||||
if (nameValidator != null)
|
if (nameValidator != null)
|
||||||
|
@ -177,7 +178,7 @@ public class SystemCommonRenameAction extends SystemBaseDialogAction
|
||||||
return dlg;
|
return dlg;
|
||||||
}
|
}
|
||||||
// single-select
|
// single-select
|
||||||
else if (getSelection().size() == 1)
|
else if (sel != null && sel.size() == 1)
|
||||||
{
|
{
|
||||||
SystemRenameSingleDialog dlg = new SystemRenameSingleDialog(parent);
|
SystemRenameSingleDialog dlg = new SystemRenameSingleDialog(parent);
|
||||||
if (copyCollisionMode)
|
if (copyCollisionMode)
|
||||||
|
|
Loading…
Add table
Reference in a new issue