Describe the bug
NullReferenceException on highlight duplicates if whole list is selected.
To Reproduce
Steps to reproduce the behavior:
Open new workbook
Fill some cells with values
Click "Highlight Duplicates"
See error
Additional context
Logs:
2020-06-08 21:59:54.9500 DEBUG Ribbon loaded
2020-06-08 22:00:07.4959 DEBUG HighlightDuplicates. Range selected is $1:$1048576
2020-06-08 22:00:07.6599 ERROR System.NullReferenceException: Object reference not set to an instance of an object.
at NavfertyExcelAddIn.WorksheetCellsEditing.DuplicatesHighlighter.<>c.<ExtractDuplicates>b__2_0(Range x) in C:\Users\navfe\source\repos\NavfertyExcelAddIn\NavfertyExcelAddIn\WorksheetCellsEditing\DuplicatesHighlighter.cs:line 37
at System.Linq.Lookup`2.Create[TSource](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
at System.Linq.GroupedEnumerable`3.GetEnumerator()
at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector)
at NavfertyExcelAddIn.WorksheetCellsEditing.DuplicatesHighlighter.ExtractDuplicates(IEnumerable`1 cells) in C:\Users\navfe\source\repos\NavfertyExcelAddIn\NavfertyExcelAddIn\WorksheetCellsEditing\DuplicatesHighlighter.cs:line 36
at NavfertyExcelAddIn.WorksheetCellsEditing.DuplicatesHighlighter.HighlightDuplicates(Range range) in C:\Users\navfe\source\repos\NavfertyExcelAddIn\NavfertyExcelAddIn\WorksheetCellsEditing\DuplicatesHighlighter.cs:line 22
at Castle.DynamicProxy.AbstractInvocation.Proceed()
at NavfertyExcelAddIn.Commons.ExceptionLogger.Intercept(IInvocation invocation) in C:\Users\navfe\source\repos\NavfertyExcelAddIn\NavfertyExcelAddIn\Commons\ExceptionLogger.cs:line 27
Describe the bug NullReferenceException on highlight duplicates if whole list is selected.
To Reproduce Steps to reproduce the behavior:
Additional context
Logs: