commit d85ff1f0341cb3036d19d87f2e4787eb4d5b8a4f
parent 85fb92217d1fe65a591c2ce8718fd4dc5285e527
Author: cfillion <cfillion@users.noreply.github.com>
Date: Tue, 7 Jun 2016 21:37:01 -0400
browser: refactoring – remove redundant condition
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/browser.cpp b/src/browser.cpp
@@ -827,7 +827,7 @@ void Browser::setTarget(const int index, const Version *target, const bool toggl
if(toggle && entry->target && *entry->target == target)
resetTarget(index);
- else if(entry) {
+ else {
entry->target = target;
m_actions.insert(entry);
updateAction(index);
@@ -837,6 +837,7 @@ void Browser::setTarget(const int index, const Version *target, const bool toggl
void Browser::resetTarget(const int index)
{
Entry *entry = getEntry(index);
+
if(!entry->target)
return;