Ticket #8705: segfault_use.patch

File segfault_use.patch, 996 bytes (added by jvprat, 17 years ago)
  • gui/theme-config.cpp

     
    617617                if (iterk->key == "use") {
    618618                        if (iterk->value == name)
    619619                                error("Theme section [%s]: cannot use itself", name.c_str());
    620                         if (!config.hasSection(name))
    621                                 error("Undefined use of section [%s]", name.c_str());
     620                        if (!config.hasSection(iterk->value))
     621                                error("Undefined use of section [%s]", iterk->value.c_str());
    622622                        processResSection(config, iterk->value, true);
    623623                        continue;
    624624                }
    625625                if (iterk->key == "useAsIs") {
    626626                        if (iterk->value == name)
    627627                                error("Theme section [%s]: cannot use itself", name.c_str());
    628                         if (!config.hasSection(name))
    629                                 error("Undefined use of section [%s]", name.c_str());
     628                        if (!config.hasSection(iterk->value))
     629                                error("Undefined use of section [%s]", iterk->value.c_str());
    630630                        processResSection(config, iterk->value);
    631631                        continue;
    632632                }