[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:09 +0000 (UTC)
commit c360f0816a4d3f7b7ca5b074a08fff513e1e7d51
Author: Hans Breuer <hans breuer org>
Date: Sun Sep 27 14:33:30 2009 +0200
[scan-build] Argument with 'nonnull' attribute passed null
Also protect strcmp() against 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 4508b22..1a4b47d 100644
--- a/objects/standard/image.c
+++ b/objects/standard/image.c
@@ -189,7 +189,7 @@ image_set_props(Image *image, GPtrArray *props)
mtime = st.st_mtime;
/* handle changing the image. */
- if (strcmp(image->file, old_file) != 0 || image->mtime != mtime) {
+ if (image->file && (strcmp(image->file, old_file) != 0 || image->mtime != mtime)) {
Element *elem = &image->element;
DiaImage *img = NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]