diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-12-19 15:08:01 +0000 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-01-11 10:12:04 +0000 |
commit | 195866b16f044bc792526145b739602166ca7276 (patch) | |
tree | 9b6bc7200b8e481557d09f2cf9b2236a0519a239 /libreofficekit | |
parent | dd6006be974ce808f276c550d32f1bc01582aaf3 (diff) |
coverity#1343631 Resource leak
Change-Id: Ic5d7c88ae4080c2e103fb691c2e326a9e239aa12
(cherry picked from commit 169298fa73d2c5429d1960db6049a4ed15653b4f)
Reviewed-on: https://gerrit.libreoffice.org/21268
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'libreofficekit')
-rw-r--r-- | libreofficekit/source/gtk/lokdocview.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libreofficekit/source/gtk/lokdocview.cxx b/libreofficekit/source/gtk/lokdocview.cxx index ae8e52a15087..6ce734461f95 100644 --- a/libreofficekit/source/gtk/lokdocview.cxx +++ b/libreofficekit/source/gtk/lokdocview.cxx @@ -2649,13 +2649,13 @@ lok_doc_view_set_edit(LOKDocView* pDocView, gboolean bEdit) { LOKDocViewPrivate& priv = getPrivate(pDocView); + if (!priv->m_pDocument) + return; + GTask* task = g_task_new(pDocView, nullptr, nullptr, nullptr); LOEvent* pLOEvent = new LOEvent(LOK_SET_EDIT); GError* error = nullptr; - if (!priv->m_pDocument) - return; - pLOEvent->m_bEdit = bEdit; g_task_set_task_data(task, pLOEvent, LOEvent::destroy); |