[Xfce4-commits] [xfce/xfdesktop] 04/04: fix coverity cid 1292726 Unchecked return value
noreply at xfce.org
noreply at xfce.org
Thu May 4 14:16:26 CEST 2017
This is an automated email from the git hooks/post-receive script.
eric pushed a commit to branch master
in repository xfce/xfdesktop.
commit b0622ab9a7faaa2e7993d2def815d6350603041e
Author: Eric Koegel <eric.koegel at gmail.com>
Date: Thu May 4 15:15:29 2017 +0300
fix coverity cid 1292726 Unchecked return value
---
src/xfdesktop-icon-view.c | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/src/xfdesktop-icon-view.c b/src/xfdesktop-icon-view.c
index caf59b4..1aaf018 100644
--- a/src/xfdesktop-icon-view.c
+++ b/src/xfdesktop-icon-view.c
@@ -2980,12 +2980,15 @@ xfdesktop_icon_view_paint_icon(XfdesktopIconView *icon_view,
}
#ifdef G_ENABLE_DEBUG
- xfdesktop_icon_get_position(icon, &row, &col);
-
- DBG("painting pixbuf at %dx%d+%d+%d (row %d ,col %d)",
- pixbuf_extents.width, pixbuf_extents.height,
- pixbuf_extents.x, pixbuf_extents.y,
- row, col);
+ if(!xfdesktop_icon_get_position(icon, &row, &col)) {
+ g_warning("trying to calculate without a position for icon '%s'",
+ xfdesktop_icon_peek_label(icon));
+ } else {
+ DBG("painting pixbuf at %dx%d+%d+%d (row %d ,col %d)",
+ pixbuf_extents.width, pixbuf_extents.height,
+ pixbuf_extents.x, pixbuf_extents.y,
+ row, col);
+ }
#endif
xfdesktop_icon_view_draw_image(cr, pix, &pixbuf_extents);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list