Bug 789298 - Prompt for file history update leads to crash during startup.

This commit is contained in:
John Ralls 2017-10-26 15:34:14 -07:00
parent 77ab04100c
commit d17c24b770
3 changed files with 4 additions and 4 deletions

View File

@ -98,7 +98,7 @@ static EntryVec col_table
static EntryVec billterm_parent_col_table
{
gnc_sql_make_table_entry<CT_INT64>("parent", 0, 0, nullptr,
gnc_sql_make_table_entry<CT_GUID>("parent", 0, 0, nullptr,
bt_set_parent_guid),
};
@ -212,7 +212,7 @@ load_single_billterm (GncSqlBackend* sql_be, GncSqlRow& row,
s.billterm = pBillTerm;
s.have_guid = false;
gnc_sql_load_object (sql_be, row, GNC_ID_TAXTABLE, &s,
gnc_sql_load_object (sql_be, row, GNC_ID_BILLTERM, &s,
billterm_parent_col_table);
if (s.have_guid)
l_billterms_needing_parents.push_back(new BillTermParentGuid(s));

View File

@ -226,7 +226,7 @@ GncSqlColumnTableEntryImpl<CT_OWNERREF>::add_to_query(QofIdTypeConst obj_name,
buf.str("");
auto guid = qof_instance_get_guid(inst);
if (guid != nullptr)
buf << guid;
buf << guid_to_string(guid);
else
buf << "NULL";
vec.emplace_back(std::make_pair(guid_hdr, buf.str()));

View File

@ -889,7 +889,7 @@ load_slot_for_book_object (GncSqlBackend* sql_be, GncSqlRow& row,
guid = load_obj_guid (sql_be, row);
g_return_if_fail (guid != NULL);
inst = lookup_fn (guid, sql_be->book());
g_return_if_fail (inst != NULL);
if (inst == NULL) return; /* Silently bail if the guid isn't loaded yet. */
slot_info.be = sql_be;
slot_info.pKvpFrame = qof_instance_get_slots (inst);