Skip to content

Commit e34f879

Browse files
authored
Fix NPE with watching NatvisSection (#1378)
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.
1 parent 51a363e commit e34f879

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/DebugEngineHost/HostNatvisProject.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public static IDisposable WatchNatvisOptionSetting(HostConfigurationStore config
104104
IDisposable disposable = rmw.CurrentMonitor;
105105

106106
// Watch NatvisDiagnostic section
107-
rmw = new RegisterMonitorWrapper(CreateAndStartNatvisDiagnosticMonitor(natvisDiagnosticSection, natvisLogger));
107+
rmw = new RegisterMonitorWrapper(CreateAndStartNatvisDiagnosticMonitor(checkForSection, natvisLogger));
108108

109109
disposable.Dispose();
110110
}

0 commit comments

Comments
 (0)