fix<Clone>: fix crash after clone a new repository

This commit is contained in:
leo 2024-02-22 11:05:20 +08:00
parent faffba09c8
commit 79084c9a9a
4 changed files with 12 additions and 9 deletions

View file

@ -34,7 +34,8 @@ namespace SourceGit.ViewModels {
}
public void Clone(object param) {
var page = param as LauncherPage;
var launcher = param as Launcher;
var page = launcher.ActivePage;
if (!Preference.Instance.IsGitConfigured) {
App.RaiseException(page.GetId(), App.Text("NotConfigured"));
@ -42,7 +43,7 @@ namespace SourceGit.ViewModels {
}
if (PopupHost.CanCreatePopup()) {
PopupHost.ShowPopup(new Clone(page));
PopupHost.ShowPopup(new Clone(launcher, page));
}
}