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



Author: murrayc
Date: Wed Nov 26 08:32:05 2008
New Revision: 1757
URL: http://svn.gnome.org/viewvc/glom?rev=1757&view=rev

Log:
2008-11-25  Armin Burgmeier  <armin openismus com>

* glom/mode_data/dialog_layout_export.cc (get_layout_groups): Fixed a
crash which was caused by accessing mapGroups[1] in a
default-constructed vector. Bug #557052.


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

Modified: branches/glom-1-8/glom/mode_data/dialog_layout_export.cc
==============================================================================
--- branches/glom-1-8/glom/mode_data/dialog_layout_export.cc	(original)
+++ branches/glom-1-8/glom/mode_data/dialog_layout_export.cc	Wed Nov 26 08:32:05 2008
@@ -224,7 +224,7 @@
   //Get the data from the TreeView and store it in the document:
 
   //Get the groups and their fields:
-  Document_Glom::type_list_layout_groups mapGroups;
+  Document_Glom::type_list_layout_groups groups;
 
   //Add the fields to the one group:
   sharedptr<LayoutGroup> others = sharedptr<LayoutGroup>::create();
@@ -245,9 +245,8 @@
     }
   }
 
-  mapGroups[1] = others;
-
-  layout_groups = mapGroups;
+  groups.push_back(others);
+  layout_groups.swap(groups);
 }
 
 void Dialog_Layout_Export::on_treeview_fields_selection_changed()



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