- mm_log((1, "i_poly_poly_aa_low(im %p, count %d, polys %p, ctx %p, flusher %p)\n", im, count, polys, ctx, flusher));
+ im_log((aIMCTX, 1, "i_poly_poly_aa_low(im %p, count %d, polys %p, ctx %p, flusher %p)\n", im, count, polys, ctx, flusher));
+
+ i_clear_error();
+
+ if (count < 1) {
+ i_push_error(0, "no polygons to draw");
+ return 0;
+ }
+
+ for (k = 0; k < count; ++k) {
+ if (polys[k].count < 3) {
+ i_push_error(0, "polygons must have at least 3 points");
+ return 0;
+ }
+ }