fix: potential nullreferenceexception when accessing mainwindow.unityinstallationssource · Issue #219 · unitycoder/UnityLauncherPro · GitHub
Skip to content

fix: potential nullreferenceexception when accessing mainwindow.unityinstallationssource #219

Description

@halinhtvn3a

Description

The code accesses MainWindow.unityInstallationsSource without null checking.
If this static property is null (e.g., during initialization or if scanning failed),
the assignment gridAvailableVersions.ItemsSource = MainWindow.unityInstallationsSource
will throw a NullReferenceException, crashing the window initialization.
This is a production crash risk.

Severity: medium
File: UnityLauncherPro/UpgradeWindow.xaml.cs

Expected Behavior

The code should handle this case properly to avoid unexpected errors or degraded quality.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions