|
|
commit 91e8a0282ca92b05edd3761ccb9134156d00126a
Author: Albrecht Schlosser <albrechts.fltk@online.de>
AuthorDate: Wed Aug 5 14:34:45 2020 +0200
Commit: Albrecht Schlosser <albrechts.fltk@online.de>
CommitDate: Wed Aug 5 14:34:45 2020 +0200
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)
src/drivers/SVG/Fl_SVG_File_Surface.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git src/drivers/SVG/Fl_SVG_File_Surface.cxx src/drivers/SVG/Fl_SVG_File_Surface.cxx
index 8f5c4ec..ae0172f 100644
--- src/drivers/SVG/Fl_SVG_File_Surface.cxx
+++ 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 {
[ Direct Link to Message ] | |
|
| |