From 31389bab0ac4978dd54843b26d71d5e254cae5c4 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sat, 5 May 2018 20:44:35 -0400 Subject: [PATCH] DolphinQt/MemoryWidget: Fix dead condition in FindValue() This condition is already checked earlier in the function and exits out if it's satisfied, meaning it'll never reach this check further down. --- Source/Core/DolphinQt2/Debugger/MemoryWidget.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/Source/Core/DolphinQt2/Debugger/MemoryWidget.cpp b/Source/Core/DolphinQt2/Debugger/MemoryWidget.cpp index a0a675a535..ce65088126 100644 --- a/Source/Core/DolphinQt2/Debugger/MemoryWidget.cpp +++ b/Source/Core/DolphinQt2/Debugger/MemoryWidget.cpp @@ -507,7 +507,10 @@ void MemoryWidget::FindValue(bool next) std::vector search_for = GetValueData(); if (search_for.empty()) + { + m_result_label->setText(tr("No Value Given")); return; + } const u8* ram_ptr = nullptr; std::size_t ram_size = 0; @@ -531,12 +534,6 @@ void MemoryWidget::FindValue(bool next) return; } - if (search_for.empty()) - { - m_result_label->setText(tr("No Value Given")); - return; - } - u32 addr = 0; if (!m_search_address->text().isEmpty())