mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-05 00:09:32 -04:00
fix segfault when no layers on map and table button clicked
git-svn-id: http://svn.osgeo.org/qgis/trunk@149 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
242245f640
commit
237065fc86
@ -61,7 +61,7 @@
|
||||
#include <ogrsf_frmts.h>
|
||||
|
||||
// version
|
||||
static const char *qgisVersion = "0.0.6-alpha-dev";
|
||||
static const char *qgisVersion = "0.0.6";
|
||||
// cursors
|
||||
static unsigned char zoom_in_bits[] = {
|
||||
0xf8, 0x00, 0x06, 0x03, 0x22, 0x02, 0x21, 0x04, 0x21, 0x04, 0xfd, 0x05,
|
||||
@ -365,6 +365,7 @@ void QgisApp::identify()
|
||||
void QgisApp::attributeTable()
|
||||
{
|
||||
QListViewItem *li = legendView->currentItem();
|
||||
if(li){
|
||||
QgsMapLayer *lyr = ((QgsLegendItem *) li)->layer();
|
||||
if (lyr) {
|
||||
lyr->table();
|
||||
@ -372,6 +373,7 @@ void QgisApp::attributeTable()
|
||||
} else {
|
||||
QMessageBox::information(this, "No Layer Selected", "To open an attribute table, you must select a layer in the legend");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//void QgisApp::readWKB (const char *connInfo, QStringList tables)
|
||||
|
Loading…
x
Reference in New Issue
Block a user