heku / Kool.VsDiff

Another open source Visual Studio extension to make file/code comparison easier.
MIT License
17 stars 5 forks source link

Focusing VS Search (Ctrl+Q) causes an error dialog when no files are open #2

Closed olegtk closed 3 years ago

olegtk commented 3 years ago

See https://developercommunity.visualstudio.com/t/Quick-Search-gives-immediate-error-when-/1374751

We identified the issues is caused by NullReferenceException in DiffClipboardWithCodeCommand.OnBeforeQueryStatus() and then BaseCommand.OnBaseBeforeQueryStatus() showing an error dialog.

Please don't show any dialogs during QueryStatus calls, they are intended to be very fast and have no side effects except modifying command state. Thanks!

Name

Throw(System.NullReferenceException) Object reference not set to an instance of an object.

heku commented 3 years ago

Thanks for your suggestion and code fix, I'll merge it soon.