Hi,

 Attached is a patch for kexidb/fieldlist.cpp. Earlier, if 
FieldList::autoIncrementFields()  ( which, doxygen tells me, is not called by 
anyone else till now ), was responsible for a crash in the future when the 
FieldList object was being destroyed . 

There was an attempt to delete the autoincrement fields two times. The first 
time is when the members of  m_autoinc_fields are deleted, and the second 
time is when members of FieldList::m_fields are deleted.

Any suggestions ?

Cheers!
 Sharan Rao

Index: fieldlist.cpp
===================================================================
--- fieldlist.cpp	(revision 750642)
+++ fieldlist.cpp	(working copy)
@@ -271,7 +271,8 @@
 		return m_autoinc_fields;
 
 	m_autoinc_fields = new Field::List();
-	foreach (Field *f, m_fields) {
+        m_autoinc_fields->setAutoDelete( false );
+        foreach (Field *f, m_fields) {
 		if (f->isAutoIncrement()) {
 			m_autoinc_fields->append( f );
 		}
_______________________________________________
Kexi mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/kexi

Reply via email to