From e00a81a96197b5a040359cffeb651189927401d6 Mon Sep 17 00:00:00 2001 From: Benau Date: Tue, 15 Aug 2023 10:48:21 +0800 Subject: [PATCH] Fix broken ProgressBarMessage after 8f596e29b3a4ae249018c98054e64d42971d51f7 --- src/guiengine/message_queue.cpp | 1 + src/guiengine/widgets/progress_bar_widget.cpp | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/guiengine/message_queue.cpp b/src/guiengine/message_queue.cpp index 30d6ceefe..121407157 100644 --- a/src/guiengine/message_queue.cpp +++ b/src/guiengine/message_queue.cpp @@ -302,6 +302,7 @@ public: ProgressBarMessage(const core::stringw& msg) : Message(9999999.9f, msg) { + m_swc.m_next = new SkinWidgetContainer; } // ProgressBarMessage // ------------------------------------------------------------------------ ~ProgressBarMessage() { g_progress.store(-1); } diff --git a/src/guiengine/widgets/progress_bar_widget.cpp b/src/guiengine/widgets/progress_bar_widget.cpp index 88b46b76b..dc7564b5e 100644 --- a/src/guiengine/widgets/progress_bar_widget.cpp +++ b/src/guiengine/widgets/progress_bar_widget.cpp @@ -33,8 +33,8 @@ using namespace irr; ProgressBarWidget::ProgressBarWidget(bool show_label) : Widget(WTYPE_PROGRESS) { // A progress bar consists of two parts, so need two containers - m_next = new SkinWidgetContainer; - + m_next = new SkinWidgetContainer; + m_value = 0; m_target_value = 0; m_previous_value = 0;