Comment 1 for bug 1633786

Revision history for this message
Stephen Lyons (slysven) wrote :

Aaargh, for a new profile when the name is attempted to be looked up in the (QStringList)dlgConnectionProfiles::mProfileList using QStringList::indexOf( QString ) it returns -1 if the argument is NOT in the QStringList.

I had previous spotted that the number returned by indexOf(...) could be 0 and ensured that where the number was used as a divisor to generate the sixth of six pseudo-random 0-255 value use to give non-predefined MUD profile icons a random colour shaded icon then 1 (one) was added to it to make sure there could not be a crash caused if the new profile name happened to match the first profile "Avalon". In doing that I have now greatly increased the likely-hood of a crash as the zero divisor will be so for ANY new profile name that is not (correctly as it happens) in the existing list.

Fix in progress right now.