summaryrefslogtreecommitdiff
path: root/libreofficekit
diff options
context:
space:
mode:
authorPranav Kant <pranavk@gnome.org>2015-07-25 21:21:34 +0530
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-07-28 15:04:14 +0200
commit57ec1780d654e335e09a6c64c4d48234f0556635 (patch)
tree2cd555489028a9b976d13a4e55457baa4f75557d /libreofficekit
parenta7f12df929226ba43356d3d092851b07c84ae1c4 (diff)
lokdocview: Cannot use same GTask object for all calls.
Change-Id: I875d49a9e4360659087ae70456edefb15bc57b20
Diffstat (limited to 'libreofficekit')
-rw-r--r--libreofficekit/source/gtk/lokdocview.cxx9
1 files changed, 6 insertions, 3 deletions
diff --git a/libreofficekit/source/gtk/lokdocview.cxx b/libreofficekit/source/gtk/lokdocview.cxx
index 60bdbd4d9579..825eb1006596 100644
--- a/libreofficekit/source/gtk/lokdocview.cxx
+++ b/libreofficekit/source/gtk/lokdocview.cxx
@@ -475,12 +475,15 @@ setTilesInvalid (LOKDocView* pDocView, const GdkRectangle& rRectangle)
aStart.y = aRectanglePixels.x / nTileSizePixels;
aEnd.x = (aRectanglePixels.y + aRectanglePixels.height + nTileSizePixels) / nTileSizePixels;
aEnd.y = (aRectanglePixels.x + aRectanglePixels.width + nTileSizePixels) / nTileSizePixels;
- GTask* task = g_task_new(pDocView, NULL, NULL, NULL);
for (int i = aStart.x; i < aEnd.x; i++)
+ {
for (int j = aStart.y; j < aEnd.y; j++)
+ {
+ GTask* task = g_task_new(pDocView, NULL, NULL, NULL);
priv->m_aTileBuffer.setInvalid(i, j, priv->m_fZoom, task);
-
- g_object_unref(task);
+ g_object_unref(task);
+ }
+ }
}
static gboolean