mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-18 00:03:05 -04:00
Fix some Coverity null pointer dereference warnings
This commit is contained in:
parent
9a07cd513a
commit
e7ddfff09d
@ -2037,7 +2037,7 @@ bool QgsAttributeForm::fieldIsEditable( int fieldIndex ) const
|
||||
int srcFieldIndex;
|
||||
const QgsVectorLayerJoinInfo *info = mLayer->joinBuffer()->joinForFieldIndex( fieldIndex, mLayer->fields(), srcFieldIndex );
|
||||
|
||||
if ( !info->hasUpsertOnEdit() && mMode == QgsAttributeForm::AddFeatureMode )
|
||||
if ( info && !info->hasUpsertOnEdit() && mMode == QgsAttributeForm::AddFeatureMode )
|
||||
editable = false;
|
||||
else if ( info && info->isEditable() && info->joinLayer()->isEditable() )
|
||||
editable = fieldIsEditable( *( info->joinLayer() ), srcFieldIndex, mFeature.id() );
|
||||
|
@ -383,7 +383,7 @@ bool QgsGeoPackageConnectionItem::handleDrop( const QMimeData *data, Qt::DropAct
|
||||
{
|
||||
if ( isVector ) // Import vectors and aspatial
|
||||
{
|
||||
QgsVectorLayer *vectorSrcLayer = dynamic_cast < QgsVectorLayer * >( srcLayer );
|
||||
QgsVectorLayer *vectorSrcLayer = qobject_cast < QgsVectorLayer * >( srcLayer );
|
||||
QVariantMap options;
|
||||
options.insert( QStringLiteral( "driverName" ), QStringLiteral( "GPKG" ) );
|
||||
options.insert( QStringLiteral( "update" ), true );
|
||||
|
Loading…
x
Reference in New Issue
Block a user