Skip to content
Snippets Groups Projects
Commit f6db0ab3 authored by hjk's avatar hjk
Browse files

Fixes: cpaster: fix potential double deletion test

    Task:     180315
    RevBy:
    Details:
parent 2d8326d2
No related branches found
No related tags found
No related merge requests found
...@@ -136,8 +136,11 @@ QString CodepasterPlugin::serverUrl() const ...@@ -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() ...@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment