summaryrefslogtreecommitdiffstats
path: root/src/sp-pattern.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/sp-pattern.cpp')
-rw-r--r--src/sp-pattern.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/sp-pattern.cpp b/src/sp-pattern.cpp
index df8086ae7..7da63213b 100644
--- a/src/sp-pattern.cpp
+++ b/src/sp-pattern.cpp
@@ -207,10 +207,9 @@ void SPPattern::set(unsigned int key, const gchar* value) {
/* fixme: We need ::order_changed handler too (Lauris) */
void SPPattern::_get_children(std::list<SPObject*>& l) {
- SPPattern *pat = this;
- for (SPPattern *pat_i = pat; pat_i != NULL; pat_i = pat_i->ref ? pat_i->ref->getObject() : NULL) {
+ for (SPPattern *pat_i = this; pat_i != NULL; pat_i = pat_i->ref ? pat_i->ref->getObject() : NULL) {
if (pat_i->firstChild()) { // find the first one with children
- for (SPObject *child = pat->firstChild() ; child ; child = child->getNext() ) {
+ for (SPObject *child = pat_i->firstChild() ; child ; child = child->getNext() ) {
l.push_back(child);
}
break; // do not go further up the chain if children are found