glom r1958 - in trunk: . glom/libglom/data_structure



Author: murrayc
Date: Thu Mar  5 11:05:44 2009
New Revision: 1958
URL: http://svn.gnome.org/viewvc/glom?rev=1958&view=rev

Log:
2009-03-05  Murray Cumming  <murrayc murrayc com>

* glom/libglom/data_structure/field.cc: from_file_format(): Add some 
checks.

Modified:
   trunk/ChangeLog
   trunk/glom/libglom/data_structure/field.cc

Modified: trunk/glom/libglom/data_structure/field.cc
==============================================================================
--- trunk/glom/libglom/data_structure/field.cc	(original)
+++ trunk/glom/libglom/data_structure/field.cc	Thu Mar  5 11:05:44 2009
@@ -316,8 +316,11 @@
   
   if(glom_type == TYPE_IMAGE)
   {
+    if(str.empty())
+      return  Gnome::Gda::Value();
+
     GdaBinary* gdabinary = gda_string_to_binary(str.c_str());
-    if(!success)
+    if(!success || !gdabinary)
       return Gnome::Gda::Value();
     else
     {



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