summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 90ca668)
raw | patch | inline | side by side (parent: 90ca668)
author | sasilver <sasilver@users.sourceforge.net> | |
Tue, 15 Jul 2008 13:06:51 +0000 (13:06 +0000) | ||
committer | sasilver <sasilver@users.sourceforge.net> | |
Tue, 15 Jul 2008 13:06:51 +0000 (13:06 +0000) |
src/id-clash.cpp | patch | blob | history |
diff --git a/src/id-clash.cpp b/src/id-clash.cpp
index 1ce30e0ddf67f6ae11dd6d5a1ff98df8cad2a418..5980c9e7b2eebfabede7b087c0b30400095a9a22 100644 (file)
--- a/src/id-clash.cpp
+++ b/src/id-clash.cpp
for (unsigned i = 0; i < NUM_SPIPAINT_PROPERTIES; ++i) {
const SPIPaint SPStyle::*prop = SPIPaint_members[i];
const SPIPaint *paint = &(style->*prop);
- if (paint->isPaintserver()) {
- const gchar *id = SP_OBJECT_ID(paint->value.href->getObject());
- IdReference idref = { REF_STYLE, elem, SPIPaint_properties[i] };
- (*refmap)[id].push_back(idref);
+ if (paint->isPaintserver() && paint->value.href) {
+ const SPObject *obj = paint->value.href->getObject();
+ if (obj) {
+ const gchar *id = SP_OBJECT_ID(obj);
+ IdReference idref = { REF_STYLE, elem, SPIPaint_properties[i] };
+ (*refmap)[id].push_back(idref);
+ }
}
}
/* check for url(#...) references in 'filter' */
const SPIFilter *filter = &(style->filter);
if (filter->href) {
- const gchar *id = SP_OBJECT_ID(filter->href->getObject());
- IdReference idref = { REF_STYLE, elem, "filter" };
- (*refmap)[id].push_back(idref);
+ const SPObject *obj = filter->href->getObject();
+ if (obj) {
+ const gchar *id = SP_OBJECT_ID(obj);
+ IdReference idref = { REF_STYLE, elem, "filter" };
+ (*refmap)[id].push_back(idref);
+ }
}
/* check for other url(#...) references */