summaryrefslogtreecommitdiffstats
path: root/src/style.cpp
diff options
context:
space:
mode:
authorJabier Arraiza <jabier.arraiza@marker.es>2018-12-22 23:17:07 +0000
committerJabier Arraiza <jabier.arraiza@marker.es>2018-12-22 23:17:07 +0000
commit23f511cd2552844bcbe8e00e96a723efba21c26a (patch)
tree1b5c69a892160a9c7eb5aa25107554deb8187fb7 /src/style.cpp
parentupdate .po files (diff)
downloadinkscape-23f511cd2552844bcbe8e00e96a723efba21c26a.tar.gz
inkscape-23f511cd2552844bcbe8e00e96a723efba21c26a.zip
Fix create first selector
Diffstat (limited to 'src/style.cpp')
-rw-r--r--src/style.cpp10
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