summaryrefslogtreecommitdiffstats
path: root/src/color-profile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/color-profile.cpp')
-rw-r--r--src/color-profile.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/color-profile.cpp b/src/color-profile.cpp
index 690a72654..34f1b0155 100644
--- a/src/color-profile.cpp
+++ b/src/color-profile.cpp
@@ -488,18 +488,17 @@ static int getLcmsIntent( guint svgIntent )
static SPObject* bruteFind( SPDocument* document, gchar const* name )
{
SPObject* result = 0;
- const GSList * current = document->getResourceList("iccprofile");
- while ( current && !result ) {
- if ( IS_COLORPROFILE(current->data) ) {
- ColorProfile* prof = COLORPROFILE(current->data);
+ std::set<SPObject *> current = document->getResourceList("iccprofile");
+ for (std::set<SPObject *>::const_iterator it = current.begin(); (!result) && (it != current.end()); ++it) {
+ if ( IS_COLORPROFILE(*it) ) {
+ ColorProfile* prof = COLORPROFILE(*it);
if ( prof ) {
if ( prof->name && (strcmp(prof->name, name) == 0) ) {
- result = SP_OBJECT(current->data);
+ result = SP_OBJECT(*it);
break;
}
}
}
- current = g_slist_next(current);
}
return result;