# # # patch "NEWS" # from [49dc707a3c282aca5f6162a516a17919e8327352] # to [a15df731f396db003f1c0b80c21e5b3ab31ab830] # # patch "src/model/ContentDiff.cpp" # from [c9c42e727a0830e04651662e865646078faf8d02] # to [c77817f8d247996fc23d536a191a8377991d2d8c] # ============================================================ --- NEWS 49dc707a3c282aca5f6162a516a17919e8327352 +++ NEWS a15df731f396db003f1c0b80c21e5b3ab31ab830 @@ -9,6 +9,8 @@ xxxx-xx-xx (1.0rc3) - bugfix: crash when a branch was double-clicked in the changeset browser (closes FS#50) - bugfix: hang / crash on quit on Mac OS X (closes FS#47) + - bugfix: model-related crash under certain circumstances when a + revision diff was triggered - internal: bind guitone's internal settings system late to the needed QSettings backend; improve the creation of Mac OS X distributable binaries and images ============================================================ --- src/model/ContentDiff.cpp c9c42e727a0830e04651662e865646078faf8d02 +++ src/model/ContentDiff.cpp c77817f8d247996fc23d536a191a8377991d2d8c @@ -38,7 +38,6 @@ void ContentDiff::cleanup() diffParser = 0; qDeleteAll(lines); lines.clear(); - reset(); } void ContentDiff::readDatabaseDiff(const DatabaseFile & db, const QString & fileName, @@ -331,13 +330,15 @@ QModelIndex ContentDiff::index(int row, { if (!parent.isValid()) { - if (row >= lines.size()) return QModelIndex(); + if (row < 0 || row >= lines.size()) + return QModelIndex(); ListLine * line = lines.at(row); return createIndex(row, column, line); } ListLine * parentLine = static_cast(parent.internalPointer()); - if (row >= parentLine->lines.size()) return QModelIndex(); + if (row < 0 || row >= parentLine->lines.size()) + return QModelIndex(); ListLine * line = parentLine->lines.at(row); return createIndex(row, column, line); }