[dia] [scan-build] Argument with 'nonnull' attribute passed null
- From: Hans Breuer <hans src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [dia] [scan-build] Argument with 'nonnull' attribute passed null
- Date: Fri, 23 Oct 2009 11:44:04 +0000 (UTC)
commit b282b312789a4314a34c6259eb670e670b2e726d
Author: Hans Breuer <hans breuer org>
Date: Sun Sep 27 14:04:43 2009 +0200
[scan-build] Argument with 'nonnull' attribute passed null
Avoid calling g_stat() if image->file==NULL
objects/standard/image.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/objects/standard/image.c b/objects/standard/image.c
index 89c9844..4508b22 100644
--- a/objects/standard/image.c
+++ b/objects/standard/image.c
@@ -183,7 +183,7 @@ image_set_props(Image *image, GPtrArray *props)
object_set_props_from_offsets(&image->element.object, image_offsets, props);
/* use old value on error */
- if (g_stat (image->file, &st) != 0)
+ if (!image->file || g_stat (image->file, &st) != 0)
mtime = image->mtime;
else
mtime = st.st_mtime;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]