[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:21 +0000 (UTC)
commit f6debba6748d0468d34d337146fa95147866a215
Author: Hans Breuer <hans breuer org>
Date: Fri Sep 5 13:00:55 2014 +0200
[scan-build] Dereference of null pointer (maybe)
Access to field 'object' results in a dereference of a null pointer
(loaded from variable 'cp')
File: /home/hb/from-git/dia/lib/autoroute.c
Line: 276
lib/autoroute.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/lib/autoroute.c b/lib/autoroute.c
index d64834d..ef2fc15 100644
--- a/lib/autoroute.c
+++ b/lib/autoroute.c
@@ -269,7 +269,7 @@ autolayout_adjust_for_gap(Point *pos, int dir, ConnectionPoint *cp)
Point dir_other;
/* Do absolute gaps here, once it's defined */
- if (!connpoint_is_autogap(cp)) {
+ if (!cp || !connpoint_is_autogap(cp)) {
return *pos;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]