Skip to content

Commit

Permalink
Fix crash when browsing views
Browse files Browse the repository at this point in the history
  • Loading branch information
MKleusberg committed Jan 30, 2017
1 parent 2981351 commit bf1c90a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ void MainWindow::populateTable()
} else {
QVector<QString> v;
bool only_defaults = true;
const sqlb::FieldVector& tablefields = db.getObjectByName(tablename).dynamicCast<sqlb::Table>()->fields();
const sqlb::FieldInfoList& tablefields = db.getObjectByName(tablename)->fieldInformation();
for(int i=0; i<tablefields.size(); ++i)
{
QString format = tableIt.value().displayFormats[i+1];
Expand All @@ -437,7 +437,7 @@ void MainWindow::populateTable()
v.push_back(format);
only_defaults = false;
} else {
v.push_back(sqlb::escapeIdentifier(tablefields.at(i)->name()));
v.push_back(sqlb::escapeIdentifier(tablefields.at(i).name));
}
}
if(only_defaults)
Expand Down

0 comments on commit bf1c90a

Please sign in to comment.