glom r1752 - in branches/glom-1-8: . glom/mode_data



Author: murrayc
Date: Mon Nov 24 16:56:21 2008
New Revision: 1752
URL: http://svn.gnome.org/viewvc/glom?rev=1752&view=rev

Log:
2008-11-24  Murray Cumming  <murrayc murrayc com>

* glom/mode_data/box_data_details.cc: 
set_found_set_from_primary_key_value(): Do not crash if there is no 
primary key, though we should not allow tables with no primary keys.

Modified:
   branches/glom-1-8/ChangeLog
   branches/glom-1-8/glom/mode_data/box_data_details.cc

Modified: branches/glom-1-8/glom/mode_data/box_data_details.cc
==============================================================================
--- branches/glom-1-8/glom/mode_data/box_data_details.cc	(original)
+++ branches/glom-1-8/glom/mode_data/box_data_details.cc	Mon Nov 24 16:56:21 2008
@@ -152,6 +152,9 @@
 
 void Box_Data_Details::set_found_set_from_primary_key_value()
 {
+  if(!m_field_primary_key)
+    return;
+
   if(!m_primary_key_value.is_null())
   {
     m_found_set.m_where_clause = "\"" + m_table_name + "\".\"" + m_field_primary_key->get_name() + 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]