Changeset 13686


Ignore:
Timestamp:
Dec 24, 2012, 7:53:33 PM (8 years ago)
Author:
jordan
Message:

(trunk, qt) #5192 'Free Memory Read error in transmission-qt's Prefs destructor' -- fixed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/qt/prefs.cc

    r13683 r13686  
    225225            tr_variantDictAddStr (&current_settings, key, val.value<FilterMode>().name().toUtf8().constData());
    226226            break;
     227
    227228          case QVariant::String:
    228229            {
    229               const char * s = val.toByteArray().constData();
     230              const QByteArray ba (val.toByteArray());
     231              const char * s = ba.constData();
    230232              if (Utils::isValidUtf8 (s))
    231233                tr_variantDictAddStr (&current_settings, key, s);
     
    324326{
    325327  assert (myItems[key].type == QVariant::String);
    326   QByteArray b = myValues[key].toByteArray();
     328  const QByteArray b = myValues[key].toByteArray();
    327329  if (Utils::isValidUtf8 (b.constData()))
    328330    myValues[key].setValue (QString::fromUtf8 (b.constData()));
Note: See TracChangeset for help on using the changeset viewer.