SVN commit 757753 by mlaurent: Fix crash M +9 -7 pppdata.cpp --- trunk/KDE/kdenetwork/kppp/pppdata.cpp #757752:757753 @@ -409,7 +409,6 @@ return true; } - bool PPPData::deleteModem() { if(cmodem < 0) return false; @@ -441,13 +440,16 @@ // make sure the top modem is cleared setModemByIndex(modemhighcount); map = config->entryMap(cmodemgroup); - it = map.begin(); - KConfigGroup cg2(config, cmodemgroup); - while (!it.key().isNull()) { - cg2.writeEntry(it.key(), ""); - it++; + if( !map.isEmpty()) + { + it = map.begin(); + KConfigGroup cg2(config, cmodemgroup); + while (!it.key().isEmpty()) { + if(!it.key().isEmpty()) + cg2.writeEntry(it.key(), ""); + it++; + } } - modemhighcount--; if(cmodem > modemhighcount) cmodem = modemhighcount;