mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-04 00:30:59 -05:00
Fix spatialite crash on field added
Fixes #34375 Add a check for the field index validity, but the issue was really an undesired side effect of the spaghetti-signal-slot hell.
This commit is contained in:
parent
1c53c7744b
commit
2024fb5683
@ -1024,6 +1024,11 @@ QVariant QgsSpatiaLiteProvider::defaultValue( int fieldId ) const
|
||||
|
||||
QString QgsSpatiaLiteProvider::defaultValueClause( int fieldIndex ) const
|
||||
{
|
||||
if ( ! mAttributeFields.exists( fieldIndex ) )
|
||||
{
|
||||
return QString();
|
||||
}
|
||||
|
||||
if ( mAttributeFields.at( fieldIndex ).name() == mPrimaryKey && mPrimaryKeyAutoIncrement )
|
||||
{
|
||||
return tr( "Autogenerate" );
|
||||
|
Loading…
x
Reference in New Issue
Block a user