diff options
author | hjk <qtc-committer@nokia.com> | 2009-02-04 18:03:50 +0100 |
---|---|---|
committer | hjk <qtc-committer@nokia.com> | 2009-02-04 18:03:50 +0100 |
commit | f6db0ab343f09f02d223641c6915c25a1da6be55 (patch) | |
tree | 138df307d50be49fbc3911f852b300b7768c88dd | |
parent | 2d8326d21462570892dc82136f456ef03c883d83 (diff) | |
download | qt-creator-f6db0ab343f09f02d223641c6915c25a1da6be55.tar.gz |
Fixes: cpaster: fix potential double deletion test
Task: 180315
RevBy:
Details:
-rw-r--r-- | src/plugins/cpaster/cpasterplugin.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/plugins/cpaster/cpasterplugin.cpp b/src/plugins/cpaster/cpasterplugin.cpp index 28936dc62e..f0cda5147c 100644 --- a/src/plugins/cpaster/cpasterplugin.cpp +++ b/src/plugins/cpaster/cpasterplugin.cpp @@ -136,8 +136,11 @@ QString CodepasterPlugin::serverUrl() const void CodepasterPlugin::post() { - if (m_poster) + // FIXME: The whole m_poster thing is de facto a simple function call. + if (m_poster) { delete m_poster; + m_poster = 0; + } IEditor* editor = EditorManager::instance()->currentEditor(); ITextEditor* textEditor = qobject_cast<ITextEditor*>(editor); if (!textEditor) @@ -196,8 +199,10 @@ void CodepasterPlugin::post() void CodepasterPlugin::fetch() { - if (m_fetcher) + if (m_fetcher) { delete m_fetcher; + m_fetcher = 0; + } m_fetcher = new CustomFetcher(serverUrl()); QDialog dialog; |