forked from qt-creator/qt-creator
Fixes: cpaster: fix potential double deletion test
Task: 180315
RevBy:
Details:
This commit is contained in:
@@ -136,8 +136,11 @@ QString CodepasterPlugin::serverUrl() const
|
|||||||
|
|
||||||
void CodepasterPlugin::post()
|
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;
|
delete m_poster;
|
||||||
|
m_poster = 0;
|
||||||
|
}
|
||||||
IEditor* editor = EditorManager::instance()->currentEditor();
|
IEditor* editor = EditorManager::instance()->currentEditor();
|
||||||
ITextEditor* textEditor = qobject_cast<ITextEditor*>(editor);
|
ITextEditor* textEditor = qobject_cast<ITextEditor*>(editor);
|
||||||
if (!textEditor)
|
if (!textEditor)
|
||||||
@@ -196,8 +199,10 @@ void CodepasterPlugin::post()
|
|||||||
|
|
||||||
void CodepasterPlugin::fetch()
|
void CodepasterPlugin::fetch()
|
||||||
{
|
{
|
||||||
if (m_fetcher)
|
if (m_fetcher) {
|
||||||
delete m_fetcher;
|
delete m_fetcher;
|
||||||
|
m_fetcher = 0;
|
||||||
|
}
|
||||||
m_fetcher = new CustomFetcher(serverUrl());
|
m_fetcher = new CustomFetcher(serverUrl());
|
||||||
|
|
||||||
QDialog dialog;
|
QDialog dialog;
|
||||||
|
|||||||
Reference in New Issue
Block a user