mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
check book guid before setting it
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@6448 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
ce95a89635
commit
c35d82e8a8
@ -216,6 +216,8 @@ gnc_book_set_guid (GNCBook *book, GUID uid)
|
||||
{
|
||||
if (!book) return;
|
||||
|
||||
if (guid_equal (&book->guid, &uid)) return;
|
||||
|
||||
xaccRemoveEntity(book->entity_table, &book->guid);
|
||||
book->guid = uid;
|
||||
xaccStoreEntity(book->entity_table, book, &book->guid, GNC_ID_BOOK);
|
||||
|
Loading…
Reference in New Issue
Block a user