|
@@ -322,6 +322,11 @@ int main(int argc, char *argv[])
|
|
|
if (Vect_open_old2(&In, map_in->answer, "", field_opt->answer) < 1)
|
|
|
G_fatal_error(_("Unable to open vector map <%s>"), map_in->answer);
|
|
|
|
|
|
+ if (Vect_get_num_primitives(&In, mask_type) == 0) {
|
|
|
+ G_warning(_("No lines found in input map <%s>"), map_in->answer);
|
|
|
+ Vect_close(&In);
|
|
|
+ exit(EXIT_SUCCESS);
|
|
|
+ }
|
|
|
with_z = Vect_is_3d(&In);
|
|
|
|
|
|
if (0 > Vect_open_new(&Out, map_out->answer, with_z)) {
|