Commit 62554e76 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh

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: default avatarEike Ziller <>
Reviewed-by: default avatarhjk <>
parent e6c85d5f
......@@ -632,6 +632,7 @@ public:
QTC_ASSERT(!directory.isEmpty(), return);
QToolButton *diffButton = addToggleButton(QLatin1String("--patch"), tr("Show Diff"),
tr("Show difference."));
mapSetting(diffButton, m_client->settings()->boolPointer(GitSettings::logDiffKey));
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment