[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [Calligra] 70ae18e: Fix leak and eliminate warnings.
From:       Shaheed <srhaque () theiet ! org>
Date:       2011-01-13 20:31:12
Message-ID: 20110113203112.6E67CA6090 () git ! kde ! org
[Download RAW message or body]

commit 70ae18e3e8b6e49e4fcb560416608c506f8eb110
branch master
Author: Shaheed <srhaque@theiet.org>
Date:   Thu Jan 13 20:26:48 2011 +0000

    Fix leak and eliminate warnings.

diff --git a/filters/words/msword-odf/texthandler.cpp b/filters/words/msword-odf/texthandler.cpp
index 01b1d02..8dae81b 100644
--- a/filters/words/msword-odf/texthandler.cpp
+++ b/filters/words/msword-odf/texthandler.cpp
@@ -1442,7 +1442,6 @@ void KWordTextHandler::fieldEnd(const wvWare::FLD* /*fld*/, wvWare::SharedPtr<co
 
     //reset
     delete m_fld;
-    m_fld = new fld_State();
 
     m_fldEnd++;
 
@@ -1450,6 +1449,7 @@ void KWordTextHandler::fieldEnd(const wvWare::FLD* /*fld*/, wvWare::SharedPtr<co
     if (!m_fldStates.empty()) {
         fld_restoreState();
     } else {
+        m_fld = new fld_State();
         QList<QString>* list = &m_fld_snippets;
         while (!list->isEmpty()) {
             //add writer content to m_paragraph as a runOfText with no text style
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic