EventMapHpViewer icon indicating copy to clipboard operation
EventMapHpViewer copied to clipboard

NRE になることがあるらしい?

Open veigr opened this issue 5 years ago • 1 comments

情報元: https://github.com/veigr/EventMapHpViewer/pull/7

箇所: https://github.com/veigr/EventMapHpViewer/blob/master/EventMapHpViewer/ViewModels/Settings/SettingsViewModel.cs#L37

可能性としては KanColleClient.Current.IsStarted をトリガーにしているものの、ほぼ同タイミングで初期化される Models.Maps.MapInfos を読み込んでいるためだと考えられる。 手抜きせずに Models.Maps.MapInfos 自体が初期化通知をして、それをトリガーとすべき案件な気がする。

PR のように null 時に null を代入するだけではマップコンボボックスの中身が表示されなくなってしまうのでダメな気がする。

veigr avatar Jul 03 '20 18:07 veigr

Have a glance of source code, And wonder that is it really necessary to use Models.Maps.MapInfos, whose data structure is almost the same as one of KanColleClient.Current.Master.MapInfos?

related #11

laserdark avatar Apr 04 '21 05:04 laserdark