From 05968a48886e95d11439a29c0510d31e27f44a6c Mon Sep 17 00:00:00 2001 From: Torgny Nyblom Date: Wed, 15 Sep 2010 06:52:02 +0200 Subject: Fix assert when br.marks is empty --- src/repository.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/repository.cpp') diff --git a/src/repository.cpp b/src/repository.cpp index cb48b71..5c8d9c1 100644 --- a/src/repository.cpp +++ b/src/repository.cpp @@ -572,7 +572,7 @@ int FastImportRepository::resetBranch(const QString &branch, int revnum, int mar branchRef.prepend("refs/heads/"); Branch &br = branches[branch]; - if (br.created && br.created != revnum && br.marks.last()) { + if (br.created && br.created != revnum && !br.marks.isEmpty()) { QByteArray backupBranch = "refs/backups/r" + QByteArray::number(revnum) + branchRef.mid(4); qWarning() << "backing up branch" << branch << "to" << backupBranch; -- cgit v1.2.1