Fix bug where NULL dates on sqlite cause sigsegv

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18283 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Phil Longstaff 2009-08-29 00:00:16 +00:00
parent 05a3bfd31b
commit e0f54bc356

View File

@ -1691,6 +1691,8 @@ load_date( const GncSqlBackend* be, GncSqlRow* row,
if( G_VALUE_HOLDS_STRING( val ) ) {
// Format of date is YYYYMMDD
const gchar* s = g_value_get_string( val );
if( s != NULL ) {
gchar buf[5];
GDateDay day;
guint month;
@ -1710,6 +1712,7 @@ load_date( const GncSqlBackend* be, GncSqlRow* row,
(*setter)( pObject, date );
g_date_free( date );
}
}
} else {
PWARN( "Unknown date type: %s", G_VALUE_TYPE_NAME( val ) );
}