Skip to content
Permalink
Browse files

fix qgis crash on startup (invalid pointer)

  • Loading branch information
myarjunar authored and nyalldawson committed Aug 22, 2017
1 parent bea89b3 commit 92a1550b18ba0e333d2c42b87133c1d7358888de
Showing with 12 additions and 5 deletions.
  1. +6 −2 src/providers/ows/qgsowsdataitems.cpp
  2. +6 −3 src/providers/wfs/qgswfsdataitems.cpp
@@ -262,11 +262,15 @@ void QgsOWSRootItem::newConnection()
static QStringList extensions = QStringList();
static QStringList wildcards = QStringList();

QGISEXTERN QList<QgsDataItemProvider *> dataItemProviders()
QGISEXTERN QList<QgsDataItemProvider *> *dataItemProviders()
{
return QList<QgsDataItemProvider *>()
QList<QgsDataItemProvider *> *providers = new QList<QgsDataItemProvider *>();

*providers
<< new QgsOwsDataItemProvider
<< new QgsGeoNodeDataItemProvider;

return providers;
}

QgsDataItem *QgsOwsDataItemProvider::createDataItem( const QString &path, QgsDataItem *parentItem )
@@ -309,8 +309,11 @@ QGISEXTERN QgsDataItem *dataItem( QString path, QgsDataItem *parentItem )
return nullptr;
}

QGISEXTERN QList<QgsDataItemProvider *> dataItemProviders()
QGISEXTERN QList<QgsDataItemProvider *> *dataItemProviders()
{
return QList<QgsDataItemProvider *>()
<< new QgsWfsDataItemProvider;
QList<QgsDataItemProvider *> *providers = new QList<QgsDataItemProvider *>();

*providers << new QgsWfsDataItemProvider;

return providers;
}

0 comments on commit 92a1550

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