microsoft / MIEngine

The Visual Studio MI Debug Engine ("MIEngine") provides an open-source Visual Studio Debugger extension that works with MI-enabled debuggers such as gdb and lldb.
MIT License
818 stars 218 forks source link

Fix NPE with watching NatvisSection #1378

Closed WardenGnaw closed 1 year ago

WardenGnaw commented 1 year ago

This PR fixes the variable used for the RegistryMonitor on a fresh VS instance.

If the private registry does not have a NatvisDiagnostic section, it will watch for its creation then delete this watcher. However when creating the new watcher it would watch on a null section instead of the new natvis section.

This PR fixes that issue.