summaryrefslogtreecommitdiff
path: root/src/xfdesktop-icon-view.c
diff options
context:
space:
mode:
authorEric Koegel <eric.koegel@gmail.com>2017-05-04 15:15:29 +0300
committerEric Koegel <eric.koegel@gmail.com>2017-05-04 15:16:09 +0300
commitb0622ab9a7faaa2e7993d2def815d6350603041e (patch)
treee331537ceac0b9a7c7b82950e83e5ad98ee652a5 /src/xfdesktop-icon-view.c
parent8701fdf2c1964df7f55c0d60883eb593adb629f7 (diff)
downloadxfdesktop-b0622ab9a7faaa2e7993d2def815d6350603041e.tar.gz
fix coverity cid 1292726 Unchecked return value
Diffstat (limited to 'src/xfdesktop-icon-view.c')
-rw-r--r--src/xfdesktop-icon-view.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/xfdesktop-icon-view.c b/src/xfdesktop-icon-view.c
index caf59b41..1aaf0185 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);