diff options
| author | Alex Valavanis <valavanisalex@gmail.com> | 2013-11-14 17:42:21 +0000 |
|---|---|---|
| committer | Alex Valavanis <valavanisalex@gmail.com> | 2013-11-14 17:42:21 +0000 |
| commit | 88a0981f89303f39ec291bd5b477e311d258425c (patch) | |
| tree | bb7cd5397cf24144b27dd7fea9e062165a1abf0b /src/sp-offset.cpp | |
| parent | splivarot: Clean up assertions where possible (diff) | |
| download | inkscape-88a0981f89303f39ec291bd5b477e311d258425c.tar.gz inkscape-88a0981f89303f39ec291bd5b477e311d258425c.zip | |
More scan-build null pointer checks
(bzr r12814)
Diffstat (limited to 'src/sp-offset.cpp')
| -rw-r--r-- | src/sp-offset.cpp | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/src/sp-offset.cpp b/src/sp-offset.cpp index c5a3557a7..c6a4b730d 100644 --- a/src/sp-offset.cpp +++ b/src/sp-offset.cpp @@ -1133,28 +1133,21 @@ refresh_offset_source(SPOffset* offset) return; } - SPItem *item = SP_ITEM (refobj); - - SPCurve *curve=NULL; - - if (!SP_IS_SHAPE (item) && !SP_IS_TEXT (item)) { - return; - } + SPItem *item = SP_ITEM (refobj); + SPCurve *curve = NULL; if (SP_IS_SHAPE (item)) { curve = SP_SHAPE (item)->getCurve (); - - if (curve == NULL) { - return; - } } - - if (SP_IS_TEXT (item)) { + else if (SP_IS_TEXT (item)) { curve = SP_TEXT (item)->getNormalizedBpath (); + } + else { + return; + } - if (curve == NULL) { - return; - } + if (curve == NULL) { + return; } Path *orig = new Path; |
