debugger: don't display invalid line numbers in the stack view

This commit is contained in:
hjk
2010-10-27 18:10:34 +02:00
parent 0593aa5bba
commit 6025791feb

View File

@@ -115,7 +115,7 @@ QVariant StackHandler::data(const QModelIndex &index, int role) const
case 2: // File name
return frame.file.isEmpty() ? frame.from : QFileInfo(frame.file).fileName();
case 3: // Line number
return frame.line;
return frame.line >= 0 ? QVariant(frame.line) : QVariant();
case 4: // Address
if (frame.address)
return QString::fromAscii("0x%1").arg(frame.address, 0, 16);