[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/koffice/1.6/koffice/kexi/kexidb
From:       Jaroslaw Staniek <js () iidea ! pl>
Date:       2006-07-28 13:40:27
Message-ID: 1154094027.449141.22598.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 567285 by staniek:

fixed possible crash


 M  +2 -2      connection.cpp  


--- branches/koffice/1.6/koffice/kexi/kexidb/connection.cpp #567284:567285
@@ -1033,7 +1033,7 @@
 	if (singleTable) {
 		//make sure we will have single table:
 		for (Field::ListIterator it = querySchema.fieldsIterator(); (f = it.current()); ++it, number++) {
-			if (querySchema.isColumnVisible(number) && f->table()->lookupFieldSchema( *f )) {
+			if (querySchema.isColumnVisible(number) && f->table() && f->table()->lookupFieldSchema( *f )) {
 				//uups, no, there's at least one left join
 				singleTable = false;
 				break;
@@ -1084,7 +1084,7 @@
 					sql += (QString::fromLatin1(" AS ") + aliasString);
 //! @todo add option that allows to omit "AS" keyword
 			}
-			LookupFieldSchema *lookupFieldSchema = f->table()->lookupFieldSchema( *f );
+			LookupFieldSchema *lookupFieldSchema = f->table() ? f->table()->lookupFieldSchema( *f ) : 0;
 			if (lookupFieldSchema) {
 				// Lookup field schema found
 				// Now we also need to fetch "visible" value from the lookup table, not only the value of binding.
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic