File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
Rubberduck.Core/UI/UnitTesting/Commands
Rubberduck.VBEEditor/SourceCodeHandling Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -143,10 +143,13 @@ private IVBProject GetProject()
143
143
144
144
protected override bool EvaluateCanExecute ( object parameter )
145
145
{
146
+ bool canExecute ;
146
147
using ( var project = GetProject ( ) )
147
148
{
148
- return project != null && ! project . IsWrappingNullReference && CanExecuteCode ( project ) ;
149
+ canExecute = project != null && ! project . IsWrappingNullReference && CanExecuteCode ( project ) ;
149
150
}
151
+
152
+ return canExecute ;
150
153
}
151
154
152
155
private bool CanExecuteCode ( IVBProject project )
Original file line number Diff line number Diff line change @@ -283,7 +283,8 @@ public CodeString GetCurrentLogicalLine(QualifiedModuleName module)
283
283
284
284
public Selection GetSelection ( QualifiedModuleName module )
285
285
{
286
- using ( var component = _projectsProvider . Component ( module ) )
286
+ var component = _projectsProvider . Component ( module ) ;
287
+
287
288
using ( var codeModule = component . CodeModule )
288
289
using ( var pane = codeModule . CodePane )
289
290
{
You can’t perform that action at this time.
0 commit comments