Fix bug causing a transaction without a base to be treated as a programming error
1.1 --- a/plover-gtk/transactionhelper.c Fri Jun 08 12:14:49 2018 +0100
1.2 +++ b/plover-gtk/transactionhelper.c Fri Jun 08 14:48:00 2018 +0100
1.3 @@ -1,5 +1,5 @@
1.4 /*
1.5 - * Copyright (C) 2014, 2016 J. Ali Harlow <ali@juiblex.co.uk>
1.6 + * Copyright (C) 2014, 2016, 2018 J. Ali Harlow <ali@juiblex.co.uk>
1.7 *
1.8 * This program is free software; you can redistribute it and/or modify
1.9 * it under the terms of the GNU General Public License as published by
1.10 @@ -603,8 +603,7 @@
1.11 {
1.12 gchar *s;
1.13 g_return_val_if_fail(PLOVER_IS_TRANSACTION_HELPER(helper),NULL);
1.14 - g_return_val_if_fail(helper->base != NULL,NULL);
1.15 - if (!helper->comps)
1.16 + if (!helper->comps && helper->base)
1.17 {
1.18 s=g_strconcat(helper->base,"/repodata/comps.xml",NULL);
1.19 helper->comps=plover_comps_new_from_file(s);
1.20 @@ -770,7 +769,7 @@
1.21 }
1.22
1.23 /*
1.24 - * If plover_transaction_helper_add_transaction() failes with an error
1.25 + * If plover_transaction_helper_add_transaction() fails with an error
1.26 * of PLOVER_GENERAL_ERROR,PLOVER_GENERAL_ERROR_REQUIREMENTS_NOT_MET
1.27 * then plover_transaction_helper_get_unsatisfied() can be used to
1.28 * retrieve a textual description of the problem.