From a23bbe9364495894d9d33471c7eb244a373ed0e1 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 7 Jun 2005 12:05:40 +0000 Subject: [PATCH] don't do anything in wxLogBuffer::Flush() if there are no messages (patch 1216159) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34563 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/log.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/common/log.cpp b/src/common/log.cpp index 6397766ef6..0471c87c76 100644 --- a/src/common/log.cpp +++ b/src/common/log.cpp @@ -528,9 +528,12 @@ void wxLog::Flush() void wxLogBuffer::Flush() { - wxMessageOutputBest out; - out.Printf(_T("%s"), m_str.c_str()); - m_str.clear(); + if ( !m_str.empty() ) + { + wxMessageOutputBest out; + out.Printf(_T("%s"), m_str.c_str()); + m_str.clear(); + } } void wxLogBuffer::DoLogString(const wxChar *szString, time_t WXUNUSED(t)) -- 2.45.2