From 7320f2e70d02b4bb76fc2b7d99603034f8b2e957 Mon Sep 17 00:00:00 2001 From: Alayan <25536748+Alayan-stk-2@users.noreply.github.com> Date: Tue, 28 May 2024 19:07:29 +0200 Subject: [PATCH] Fix a crash in debug mode The assert for spinner getStringValue not returning empty is unnecessary. --- src/guiengine/widgets/spinner_widget.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/guiengine/widgets/spinner_widget.cpp b/src/guiengine/widgets/spinner_widget.cpp index 17d10af3f..05535405c 100644 --- a/src/guiengine/widgets/spinner_widget.cpp +++ b/src/guiengine/widgets/spinner_widget.cpp @@ -458,11 +458,7 @@ stringw SpinnerWidget::getStringValue() const stringw text = StringUtils::insertValues(m_text.c_str(), m_value); return text; } - else - { - assert(false); - } - /** To avoid compiler warnings about missing return statements. */ + // This can happen if the spinner has not been initialized yet. return ""; }