Skip to content
Permalink
Browse files

catch bad_alloc exception when filling the attribute table

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@7701 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent
mhugent committed Dec 1, 2007
1 parent b0c3d68 commit af5f8889f1bec6e5ffc1ba4399816640ab45dc29
Showing with 8 additions and 1 deletion.
  1. +8 −1 src/app/legend/qgslegendlayerfile.cpp
@@ -260,7 +260,14 @@ void QgsLegendLayerFile::table()
}

mTableDisplay = new QgsAttributeTableDisplay(vlayer, app);
mTableDisplay->table()->fillTable(vlayer);
try
{
mTableDisplay->table()->fillTable(vlayer);
}
catch(std::bad_alloc& ba)
{
QMessageBox::critical(0, tr("bad_alloc exception"), tr("Filling the attribute table has been stopped because there was no more virtual memory left"));
}
mTableDisplay->table()->setSorting(true);

connect(mTableDisplay, SIGNAL(deleted()), this, SLOT(invalidateTableDisplay()));

0 comments on commit af5f888

Please sign in to comment.
You can’t perform that action at this time.