summaryrefslogtreecommitdiff
path: root/src/drivers/SVG
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2020-08-05 14:34:45 +0200
committerAlbrecht Schlosser <albrechts.fltk@online.de>2020-08-05 14:34:45 +0200
commit91e8a0282ca92b05edd3761ccb9134156d00126a (patch)
tree71a054c8da9441713a4b543783198b88903f7641 /src/drivers/SVG
parent5b1c7249a5bc219f01ebc3e9b9cf64b678039de8 (diff)
Remove useless 'if (...)'
- dasharray_ can never be NULL unless if memory allocation failed previously - if dasharray_ was NULL, the previous strcmp() would have crashed anyway (but it can't be NULL, see above)
Diffstat (limited to 'src/drivers/SVG')
-rw-r--r--src/drivers/SVG/Fl_SVG_File_Surface.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/drivers/SVG/Fl_SVG_File_Surface.cxx b/src/drivers/SVG/Fl_SVG_File_Surface.cxx
index 8f5c4ec95..ae0172fc4 100644
--- a/src/drivers/SVG/Fl_SVG_File_Surface.cxx
+++ b/src/drivers/SVG/Fl_SVG_File_Surface.cxx
@@ -213,7 +213,7 @@ void Fl_SVG_Graphics_Driver::compute_dasharray(float s, char *dashes) {
int dash_part = line_style_ & 0xFF;
if (dash_part == FL_SOLID) {
if (strcmp(dasharray_, "none")) {
- if (dasharray_) free(dasharray_);
+ free(dasharray_);
dasharray_ = fl_strdup("none");
}
} else {