forked from qt-creator/qt-creator
Git: Add a soft assertion
If directory is empty, buttons remains NULL, which leads to a crash To reproduce, open Branches dialog then close all editors and projects and click Log for a branch Change-Id: Icf06b76c58585c0dd6062017e94e07dad016c275 Reviewed-by: Eike Ziller <eike.ziller@digia.com> Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
e6c85d5ff9
commit
62554e7647
@@ -632,6 +632,7 @@ public:
|
||||
m_enableAnnotationContextMenu(enableAnnotationContextMenu),
|
||||
m_fileNames(fileNames)
|
||||
{
|
||||
QTC_ASSERT(!directory.isEmpty(), return);
|
||||
QToolButton *diffButton = addToggleButton(QLatin1String("--patch"), tr("Show Diff"),
|
||||
tr("Show difference."));
|
||||
mapSetting(diffButton, m_client->settings()->boolPointer(GitSettings::logDiffKey));
|
||||
|
||||
Reference in New Issue
Block a user