Kaynağa Gözat

Vect_hist_copy: skip empty old hist

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@42322 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Metz 15 yıl önce
ebeveyn
işleme
f2f1c00894
1 değiştirilmiş dosya ile 5 ekleme ve 0 silme
  1. 5 0
      lib/vector/Vlib/hist.c

+ 5 - 0
lib/vector/Vlib/hist.c

@@ -137,6 +137,11 @@ int Vect_hist_copy(const struct Map_info *In, struct Map_info *Out)
     if (Out->hist_fp == NULL)
 	return -1;
 
+    /* skip empty old hist */
+    G_fseek(In->hist_fp, (long)0, SEEK_END);
+    if (G_ftell(In->hist_fp) == 0)
+	return 0;
+
     G_fseek(Out->hist_fp, (long)0, SEEK_END);
     rewind(In->hist_fp);