[dia] [scan-build] Dereference of null pointer (maybe)
- From: Hans Breuer <hans src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dia] [scan-build] Dereference of null pointer (maybe)
- Date: Fri, 5 Sep 2014 15:48:31 +0000 (UTC)
commit 1a9c1780e638bf00b31460d2b7282ec11964570c
Author: Hans Breuer <hans breuer org>
Date: Fri Sep 5 13:14:14 2014 +0200
[scan-build] Dereference of null pointer (maybe)
Access to field 'len' results in a dereference of a null pointer
(loaded from field 'pathes')
File: /home/hb/from-git/dia/lib/diapathrenderer.c
Line: 870
lib/diapathrenderer.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/lib/diapathrenderer.c b/lib/diapathrenderer.c
index 28ec030..9367586 100644
--- a/lib/diapathrenderer.c
+++ b/lib/diapathrenderer.c
@@ -865,6 +865,8 @@ create_standard_path_from_list (GList *objects,
_path_renderer_clear (pr);
obj->ops->draw (obj, renderer);
+ if (!pr->pathes) /* nothing created? */
+ continue;
/* get a single path from this rendererer run */
p2 = g_array_new (FALSE, FALSE, sizeof(BezPoint));
for (i = 0; i < pr->pathes->len; ++i) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]