summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOrgad Shaneh <orgad.shaneh@audiocodes.com>2013-10-17 08:54:15 +0300
committerOrgad Shaneh <orgads@gmail.com>2013-10-17 10:46:19 +0200
commita64adc4cd114526e57d6091dc9a7528264259e62 (patch)
treeefe0170dc5322b871238db56a8e352e16dfd7fa2
parent02c484a343949ec79adaf80c72ed4f3452052237 (diff)
downloadqt-creator-a64adc4cd114526e57d6091dc9a7528264259e62.tar.gz
Git: Fix crash on show stash
* show() is called with a QString reference to the model * And editor is opened, which triggers stateChanged() * stateChanged() updates StashDialog, which refreshes the model with an empty directory (another bug) * The QString name reference is invalidated => crash on access Task-number: QTCREATORBUG-10397 Change-Id: I0c4077f8c4fc90905568f80d1cd89f61c4cd2cba Reviewed-by: Eike Ziller <eike.ziller@digia.com>
-rw-r--r--src/plugins/git/stashdialog.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/git/stashdialog.cpp b/src/plugins/git/stashdialog.cpp
index ffbf7ecb3f..fecdedddd8 100644
--- a/src/plugins/git/stashdialog.cpp
+++ b/src/plugins/git/stashdialog.cpp
@@ -212,7 +212,7 @@ void StashDialog::showCurrent()
{
const int index = currentRow();
QTC_ASSERT(index >= 0, return);
- gitClient()->show(m_repository, m_model->at(index).name);
+ gitClient()->show(m_repository, QString(m_model->at(index).name));
}
// Suggest Branch name to restore 'stash@{0}' -> 'stash0-date'