From b0d572789b4b1d845b6d53eb2978a28b07e3ef7b Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Mon, 31 Jan 2022 11:29:46 +0200 Subject: [PATCH] Git: Fix assertion when upstream branch no longer exists MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I5033d43571026ab0d9b8b94892b4075e130211be Reviewed-by: André Hartmann --- src/plugins/git/branchmodel.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/plugins/git/branchmodel.cpp b/src/plugins/git/branchmodel.cpp index b6217011c28..0bc75d7813f 100644 --- a/src/plugins/git/branchmodel.cpp +++ b/src/plugins/git/branchmodel.cpp @@ -911,6 +911,8 @@ void BranchModel::updateUpstreamStatus(BranchNode *node) VcsCommand *command = d->client->asyncUpstreamStatus( d->workingDirectory, node->fullRef(), node->tracking); QObject::connect(command, &VcsCommand::stdOutText, node, [this, node](const QString &text) { + if (text.isEmpty()) + return; const QStringList split = text.trimmed().split('\t'); QTC_ASSERT(split.size() == 2, return);