summaryrefslogtreecommitdiffstats
path: root/src/ui/tools
diff options
context:
space:
mode:
authorJabier Arraiza <jabier.arraiza@marker.es>2019-09-19 23:17:06 +0000
committerJabier Arraiza <jabier.arraiza@marker.es>2019-09-29 22:44:33 +0000
commitb59fe5a257148ede38b442676ec3288290cdce6c (patch)
tree3e835f37ec6cb2cd3b3e2d25581c5e9f00d5e672 /src/ui/tools
parentTranslated nb.po, 85% complete. (diff)
downloadinkscape-b59fe5a257148ede38b442676ec3288290cdce6c.tar.gz
inkscape-b59fe5a257148ede38b442676ec3288290cdce6c.zip
fix a hard to reproduce crash on textool when the CSS comapared is nullptr
Diffstat (limited to 'src/ui/tools')
-rw-r--r--src/ui/tools/text-tool.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ui/tools/text-tool.cpp b/src/ui/tools/text-tool.cpp
index 651a00632..bba60dd95 100644
--- a/src/ui/tools/text-tool.cpp
+++ b/src/ui/tools/text-tool.cpp
@@ -1425,6 +1425,12 @@ SPCSSAttr *sp_text_get_style_at_cursor(ToolBase const *ec)
static bool css_attrs_are_equal(SPCSSAttr const *first, SPCSSAttr const *second)
{
+ if (!first && !second) {
+ return true;
+ }
+ if (!first || !second) {
+ return false;
+ }
Inkscape::Util::List<Inkscape::XML::AttributeRecord const> attrs = first->attributeList();
for ( ; attrs ; attrs++) {
gchar const *other_attr = second->attribute(g_quark_to_string(attrs->key));