File tree 1 file changed +10
-7
lines changed
1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -343,13 +343,16 @@ QStringList HikerListCompositeColumn::formatAndSortIntoStringList(QSet<BufferRow
343
343
const HikersTable* hikersTable = (HikersTable*) contentColumn->table ;
344
344
345
345
// Check whether default hiker is set and get name if so
346
- BufferRowIndex defaultHikerRowIndex = hikersTable->getBufferIndexForPrimaryKey (defaultHiker->get ());
347
- if (defaultHiker->isNotNull () && rowIndexSet.contains (defaultHikerRowIndex)) {
348
- QVariant content = contentColumn->getValueAt (defaultHikerRowIndex);
349
- assert (content.canConvert <QString>());
350
- defaultHikerString = content.toString ();
351
- // Remove default hiker from row index set
352
- rowIndexSet.remove (defaultHikerRowIndex);
346
+ if (defaultHiker->isNotNull ()) {
347
+ ValidItemID defaultHikerID = defaultHiker->get ();
348
+ BufferRowIndex defaultHikerRowIndex = hikersTable->getBufferIndexForPrimaryKey (defaultHikerID);
349
+ if (rowIndexSet.contains (defaultHikerRowIndex)) {
350
+ QVariant content = contentColumn->getValueAt (defaultHikerRowIndex);
351
+ assert (content.canConvert <QString>());
352
+ defaultHikerString = content.toString ();
353
+ // Remove default hiker from row index set
354
+ rowIndexSet.remove (defaultHikerRowIndex);
355
+ }
353
356
}
354
357
355
358
for (const BufferRowIndex& rowIndex : rowIndexSet) {
You can’t perform that action at this time.
0 commit comments