Return empty QString when no file was available.
authorMilian Wolff <mail@milianw.de>
Sun, 7 Jun 2015 11:50:16 +0000 (13:50 +0200)
committerMilian Wolff <mail@milianw.de>
Sun, 7 Jun 2015 11:50:16 +0000 (13:50 +0200)
Fixes assertion in ModelTest.

gui/model.cpp

index 57d353b..090d287 100644 (file)
@@ -189,6 +189,8 @@ QVariant Model::allocationData(const AllocationData& allocation, const IpIndex&
         } else if (ip.fileIndex) {
             auto file = QString::fromStdString(m_data.stringify(ip.fileIndex));
             return file + QLatin1Char(':') + QString::number(ip.line);
+        } else {
+            return QString();
         }
         break;
     }