Changeset: 804595885cc0 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/804595885cc0
Modified Files:
        geom/monetdb5/geomBulk.c
Branch: Jul2021
Log Message:

Don't initialize too early.


diffs (27 lines):

diff --git a/geom/monetdb5/geomBulk.c b/geom/monetdb5/geomBulk.c
--- a/geom/monetdb5/geomBulk.c
+++ b/geom/monetdb5/geomBulk.c
@@ -28,12 +28,12 @@ geom_2_geom_bat(bat *outBAT_id, bat *inB
        bool nils = false;
        wkb *inWKB = NULL, *outWKB = NULL;
 
-       bi = bat_iterator(b);
        //get the descriptor of the BAT
        if ((b = BATdescriptor(*inBAT_id)) == NULL) {
                msg = createException(MAL, "batcalc.wkb", SQLSTATE(HY005) 
RUNTIME_OBJECT_MISSING);
                goto bailout;
        }
+       bi = bat_iterator(b);
        if (cand && !is_bat_nil(*cand) && (s = BATdescriptor(*cand)) == NULL) {
                msg = createException(MAL, "batcalc.wkb", SQLSTATE(HY005) 
RUNTIME_OBJECT_MISSING);
                goto bailout;
@@ -81,7 +81,8 @@ geom_2_geom_bat(bat *outBAT_id, bat *inB
        }
 
 bailout:
-       bat_iterator_end(&bi);
+       if (b)
+               bat_iterator_end(&bi);
        if (b)
                BBPunfix(b->batCacheid);
        if (s)
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to