From 8c75ed14b15c25d60d9d251dbe3cd2c94bbad2bb Mon Sep 17 00:00:00 2001 From: Dane Finlay Date: Tue, 22 Oct 2024 14:59:01 +1100 Subject: [PATCH] Fix a problem with setMessageWindow() --- NatlinkSource/DragonCode.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/NatlinkSource/DragonCode.cpp b/NatlinkSource/DragonCode.cpp index 7083d1a..1682488 100644 --- a/NatlinkSource/DragonCode.cpp +++ b/NatlinkSource/DragonCode.cpp @@ -3727,11 +3727,9 @@ BOOL CDragonCode::setMessageWindow( m_pMessageWindowCallback = pCallback; // start the second thread for displaying messages - // and tell it about our message window if( !m_pSecdThrd ) { m_pSecdThrd = new MessageWindow( dwFlags ); - m_pSecdThrd->setMsgWnd( m_hMsgWnd ); } // otherwise, update the window @@ -3739,6 +3737,9 @@ BOOL CDragonCode::setMessageWindow( { m_pSecdThrd->updateWindow( dwFlags ); } + + // tell the second thread about our message window + m_pSecdThrd->setMsgWnd( m_hMsgWnd ); } return TRUE;