]> git.saurik.com Git - wxWidgets.git/commitdiff
don't do anything in wxLogBuffer::Flush() if there are no messages (patch 1216159)
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 7 Jun 2005 12:05:40 +0000 (12:05 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 7 Jun 2005 12:05:40 +0000 (12:05 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34563 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/log.cpp

index 6397766ef68b90d3f38d48fccdb0bc805b8dcd86..0471c87c7646952b51226ba21b4c30d627a927e2 100644 (file)
@@ -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))