aft: Check return value of load_afsi().
[paraslash.git] / aft.c
diff --git a/aft.c b/aft.c
index bfcd1fb..1afc16b 100644 (file)
--- a/aft.c
+++ b/aft.c
@@ -2272,7 +2272,9 @@ static int copy_selector_info(__a_unused struct osl_table *table,
        ret = get_afsi_object_of_row(row, &target_afsi_obj);
        if (ret < 0)
                return ret;
-       load_afsi(&target_afsi, &target_afsi_obj);
+       ret = load_afsi(&target_afsi, &target_afsi_obj);
+       if (ret < 0)
+               return ret;
        old_afsi = target_afsi;
        if (cad->flags & CPSI_FLAG_COPY_LYRICS_ID)
                target_afsi.lyrics_id = cad->source_afsi.lyrics_id;