diff options
author | Pranav Kant <pranavk@gnome.org> | 2015-10-20 01:02:56 +0530 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-10-21 12:10:49 +0000 |
commit | 54409159b8a12ca3d387e2ff2a2e1ff9dad1a2a3 (patch) | |
tree | eb597e91d2a3dccd8e409d4217c8c7404d36e8c0 /libreofficekit/source/gtk/tilebuffer.cxx | |
parent | c20f48abc6a2662fec12cb7588c69ff8e3a5d7c7 (diff) |
lokdocview: Emit a warning after error
Change-Id: Id8e20e6561239096438d420c65d0da6dcc7f5e2e
Reviewed-on: https://gerrit.libreoffice.org/19474
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'libreofficekit/source/gtk/tilebuffer.cxx')
-rw-r--r-- | libreofficekit/source/gtk/tilebuffer.cxx | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/libreofficekit/source/gtk/tilebuffer.cxx b/libreofficekit/source/gtk/tilebuffer.cxx index 70d12fefdb0a..1315839d5e71 100644 --- a/libreofficekit/source/gtk/tilebuffer.cxx +++ b/libreofficekit/source/gtk/tilebuffer.cxx @@ -55,6 +55,7 @@ void TileBuffer::setInvalid(int x, int y, float fZoom, GTask* task, GThreadPool* lokThreadPool) { int index = x * m_nWidth + y; + GError* error = NULL; if (m_mTiles.find(index) != m_mTiles.end()) { m_mTiles[index].valid = false; @@ -64,7 +65,12 @@ void TileBuffer::setInvalid(int x, int y, float fZoom, GTask* task, pLOEvent->m_nPaintTileY = y; pLOEvent->m_fPaintTileZoom = fZoom; g_task_set_task_data(task, pLOEvent, LOEvent::destroy); - g_thread_pool_push(lokThreadPool, g_object_ref(task), NULL); + g_thread_pool_push(lokThreadPool, g_object_ref(task), &error); + if (error != NULL) + { + g_warning("Unable to call LOK_PAINT_TILE: %s", error->message); + g_clear_error(&error); + } } } @@ -72,6 +78,7 @@ Tile& TileBuffer::getTile(int x, int y, float fZoom, GTask* task, GThreadPool* lokThreadPool) { int index = x * m_nWidth + y; + GError* error = NULL; if (m_mTiles.find(index) != m_mTiles.end() && !m_mTiles[index].valid) { @@ -80,7 +87,12 @@ Tile& TileBuffer::getTile(int x, int y, float fZoom, GTask* task, pLOEvent->m_nPaintTileY = y; pLOEvent->m_fPaintTileZoom = fZoom; g_task_set_task_data(task, pLOEvent, LOEvent::destroy); - g_thread_pool_push(lokThreadPool, g_object_ref(task), NULL); + g_thread_pool_push(lokThreadPool, g_object_ref(task), &error); + if (error != NULL) + { + g_warning("Unable to call LOK_PAINT_TILE: %s", error->message); + g_clear_error(&error); + } return m_mTiles[index]; } else if(m_mTiles.find(index) == m_mTiles.end()) @@ -90,7 +102,12 @@ Tile& TileBuffer::getTile(int x, int y, float fZoom, GTask* task, pLOEvent->m_nPaintTileY = y; pLOEvent->m_fPaintTileZoom = fZoom; g_task_set_task_data(task, pLOEvent, LOEvent::destroy); - g_thread_pool_push(lokThreadPool, g_object_ref(task), NULL); + g_thread_pool_push(lokThreadPool, g_object_ref(task), &error); + if (error != NULL) + { + g_warning("Unable to call LOK_PAINT_TILE: %s", error->message); + g_clear_error(&error); + } return m_DummyTile; } |