coverity#1343633 Resource leak
Change-Id: I2384091557c2a3b061e2c60118309f35b65b45d6
This commit is contained in:
parent
5b05a3fa2d
commit
746da6b7fb
@ -334,6 +334,9 @@ static void
|
|||||||
doSearch(LOKDocView* pDocView, const char* pText, bool bBackwards, bool highlightAll)
|
doSearch(LOKDocView* pDocView, const char* pText, bool bBackwards, bool highlightAll)
|
||||||
{
|
{
|
||||||
LOKDocViewPrivate& priv = getPrivate(pDocView);
|
LOKDocViewPrivate& priv = getPrivate(pDocView);
|
||||||
|
if (!priv->m_pDocument)
|
||||||
|
return;
|
||||||
|
|
||||||
boost::property_tree::ptree aTree;
|
boost::property_tree::ptree aTree;
|
||||||
GtkWidget* drawingWidget = GTK_WIDGET(pDocView);
|
GtkWidget* drawingWidget = GTK_WIDGET(pDocView);
|
||||||
GdkWindow* drawingWindow = gtk_widget_get_window(drawingWidget);
|
GdkWindow* drawingWindow = gtk_widget_get_window(drawingWidget);
|
||||||
@ -341,9 +344,6 @@ doSearch(LOKDocView* pDocView, const char* pText, bool bBackwards, bool highligh
|
|||||||
cairo_rectangle_int_t cairoVisRect;
|
cairo_rectangle_int_t cairoVisRect;
|
||||||
int x, y;
|
int x, y;
|
||||||
|
|
||||||
if (!priv->m_pDocument)
|
|
||||||
return;
|
|
||||||
|
|
||||||
cairo_region_get_rectangle(cairoVisRegion, 0, &cairoVisRect);
|
cairo_region_get_rectangle(cairoVisRegion, 0, &cairoVisRect);
|
||||||
x = pixelToTwip (cairoVisRect.x, priv->m_fZoom);
|
x = pixelToTwip (cairoVisRect.x, priv->m_fZoom);
|
||||||
y = pixelToTwip (cairoVisRect.y, priv->m_fZoom);
|
y = pixelToTwip (cairoVisRect.y, priv->m_fZoom);
|
||||||
@ -2543,13 +2543,13 @@ SAL_DLLPUBLIC_EXPORT void
|
|||||||
lok_doc_view_set_part (LOKDocView* pDocView, int nPart)
|
lok_doc_view_set_part (LOKDocView* pDocView, int nPart)
|
||||||
{
|
{
|
||||||
LOKDocViewPrivate& priv = getPrivate(pDocView);
|
LOKDocViewPrivate& priv = getPrivate(pDocView);
|
||||||
|
if (!priv->m_pDocument)
|
||||||
|
return;
|
||||||
|
|
||||||
GTask* task = g_task_new(pDocView, nullptr, nullptr, nullptr);
|
GTask* task = g_task_new(pDocView, nullptr, nullptr, nullptr);
|
||||||
LOEvent* pLOEvent = new LOEvent(LOK_SET_PART);
|
LOEvent* pLOEvent = new LOEvent(LOK_SET_PART);
|
||||||
GError* error = nullptr;
|
GError* error = nullptr;
|
||||||
|
|
||||||
if (!priv->m_pDocument)
|
|
||||||
return;
|
|
||||||
|
|
||||||
pLOEvent->m_nPart = nPart;
|
pLOEvent->m_nPart = nPart;
|
||||||
g_task_set_task_data(task, pLOEvent, LOEvent::destroy);
|
g_task_set_task_data(task, pLOEvent, LOEvent::destroy);
|
||||||
|
|
||||||
@ -2566,7 +2566,6 @@ SAL_DLLPUBLIC_EXPORT gchar*
|
|||||||
lok_doc_view_get_part_name (LOKDocView* pDocView, int nPart)
|
lok_doc_view_get_part_name (LOKDocView* pDocView, int nPart)
|
||||||
{
|
{
|
||||||
LOKDocViewPrivate& priv = getPrivate(pDocView);
|
LOKDocViewPrivate& priv = getPrivate(pDocView);
|
||||||
|
|
||||||
if (!priv->m_pDocument)
|
if (!priv->m_pDocument)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
@ -2682,7 +2681,6 @@ lok_doc_view_post_command (LOKDocView* pDocView,
|
|||||||
gboolean bNotifyWhenFinished)
|
gboolean bNotifyWhenFinished)
|
||||||
{
|
{
|
||||||
LOKDocViewPrivate& priv = getPrivate(pDocView);
|
LOKDocViewPrivate& priv = getPrivate(pDocView);
|
||||||
|
|
||||||
if (!priv->m_pDocument)
|
if (!priv->m_pDocument)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user