diff options
| author | Jabier Arraiza <jabier.arraiza@marker.es> | 2018-12-22 23:17:07 +0000 |
|---|---|---|
| committer | Jabier Arraiza <jabier.arraiza@marker.es> | 2018-12-22 23:17:07 +0000 |
| commit | 23f511cd2552844bcbe8e00e96a723efba21c26a (patch) | |
| tree | 1b5c69a892160a9c7eb5aa25107554deb8187fb7 /src/style.cpp | |
| parent | update .po files (diff) | |
| download | inkscape-23f511cd2552844bcbe8e00e96a723efba21c26a.tar.gz inkscape-23f511cd2552844bcbe8e00e96a723efba21c26a.zip | |
Fix create first selector
Diffstat (limited to 'src/style.cpp')
| -rw-r--r-- | src/style.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/style.cpp b/src/style.cpp index 203abc608..aab8f2695 100644 --- a/src/style.cpp +++ b/src/style.cpp @@ -817,10 +817,14 @@ SPStyle::mergeString( gchar const *const p ) { */ void SPStyle::mergeStatement( CRStatement *statement ) { - if (statement->type != RULESET_STMT) return; - CRDeclaration *decl_list = NULL; + if (statement->type != RULESET_STMT) { + return; + } + CRDeclaration *decl_list = nullptr; cr_statement_ruleset_get_declarations (statement, &decl_list); - _mergeDeclList(decl_list, SP_STYLE_SRC_STYLE_SHEET); + if (decl_list) { + _mergeDeclList(decl_list, SP_STYLE_SRC_STYLE_SHEET); + } } // Mostly for unit testing |
