aboutsummaryrefslogtreecommitdiffstats
path: root/src/repository.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/repository.cpp')
-rw-r--r--src/repository.cpp2
1 files changed, 1 insertions, 1 deletions
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;