Skip to content

Commit

Permalink
fixed NRE
Browse files Browse the repository at this point in the history
  • Loading branch information
retailcoder committed Oct 5, 2016
1 parent ee95ad8 commit b6171ff
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions RetailCoder.VBE/Refactorings/Rename/RenameRefactoring.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,17 +80,18 @@ public void Refactor(Declaration target)

var oldSelection = Selection.Home;
var pane = _vbe.ActiveCodePane;
if (!pane.IsWrappingNullReference)
{
if (!pane.IsWrappingNullReference)
{
oldSelection = pane.GetSelection();
}
oldSelection = pane.GetSelection();
}

if (_model != null && _model.Declarations != null)
{
Rename();
}
if (_model != null && _model.Declarations != null)
{
Rename();
}

if (!pane.IsWrappingNullReference)
{
pane.SetSelection(oldSelection);
}
}
Expand Down

0 comments on commit b6171ff

Please sign in to comment.