# HG changeset patch # User J. Ali Harlow # Date 1528465680 -3600 # Node ID 6575679d2e8edbfdce45dcaf13b31b391fa82454 # Parent a69a7f215b922cd0d11e1afe9503e9bf5ddec261 Fix bug causing a transaction without a base to be treated as a programming error diff -r a69a7f215b92 -r 6575679d2e8e plover-gtk/transactionhelper.c --- a/plover-gtk/transactionhelper.c Fri Jun 08 12:14:49 2018 +0100 +++ b/plover-gtk/transactionhelper.c Fri Jun 08 14:48:00 2018 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2014, 2016 J. Ali Harlow + * Copyright (C) 2014, 2016, 2018 J. Ali Harlow * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -603,8 +603,7 @@ { gchar *s; g_return_val_if_fail(PLOVER_IS_TRANSACTION_HELPER(helper),NULL); - g_return_val_if_fail(helper->base != NULL,NULL); - if (!helper->comps) + if (!helper->comps && helper->base) { s=g_strconcat(helper->base,"/repodata/comps.xml",NULL); helper->comps=plover_comps_new_from_file(s); @@ -770,7 +769,7 @@ } /* - * If plover_transaction_helper_add_transaction() failes with an error + * If plover_transaction_helper_add_transaction() fails with an error * of PLOVER_GENERAL_ERROR,PLOVER_GENERAL_ERROR_REQUIREMENTS_NOT_MET * then plover_transaction_helper_get_unsatisfied() can be used to * retrieve a textual description of the problem.