glom r1822 - in trunk: . glom
- From: murrayc svn gnome org
- To: svn-commits-list gnome org
- Subject: glom r1822 - in trunk: . glom
- Date: Sun, 21 Dec 2008 16:52:24 +0000 (UTC)
Author: murrayc
Date: Sun Dec 21 16:52:24 2008
New Revision: 1822
URL: http://svn.gnome.org/viewvc/glom?rev=1822&view=rev
Log:
2008-12-21 Murray Cumming <murrayc murrayc com>
* glom/base_db.cc: get_primary_key_is_in_foundset(): Avoid a crash
when (unusually) the primary key is not known.
Modified:
trunk/ChangeLog
trunk/glom/base_db.cc
Modified: trunk/glom/base_db.cc
==============================================================================
--- trunk/glom/base_db.cc (original)
+++ trunk/glom/base_db.cc Sun Dec 21 16:52:24 2008
@@ -2824,6 +2824,11 @@
{
//TODO_Performance: This is probably called too often, when we should know that the key is in the found set.
sharedptr<const Field> primary_key = get_field_primary_key_for_table(found_set.m_table_name);
+ if(!primary_key)
+ {
+ std::cerr << "Base_DB::get_primary_key_is_in_foundset(): No primary key found for table: " << found_set.m_table_name << std::endl;
+ return false;
+ }
type_vecLayoutFields fieldsToGet;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]