fix: Allow optional button in event report view

This commit is contained in:
2025-02-14 18:21:27 +08:00
parent fd1e92f810
commit 76b33627d5

View File

@@ -15,7 +15,7 @@ namespace Cryville.EEW.Unity.UI {
ReportViewModel _viewModel;
protected virtual void Start() {
m_reportViewButton.onClick.AddListener(OnViewClicked);
if (m_reportViewButton != null) m_reportViewButton.onClick.AddListener(OnViewClicked);
}
void OnViewClicked() {
Worker.Instance.SetSelected(_viewModel);