1.1 --- a/src/lemon/graph_writer.h Tue Apr 12 17:33:41 2005 +0000
1.2 +++ b/src/lemon/graph_writer.h Tue Apr 12 17:34:51 2005 +0000
1.3 @@ -382,6 +382,7 @@
1.4
1.5 void writeEdgeSet(WriterBase<Node>* nodeWriter,
1.6 WriterBase<Edge>* & edgeWriter) {
1.7 + if (edge_map_writers.size() == 0) return;
1.8 if (nodeWriter == 0) {
1.9 throw DataFormatError("Cannot find node id map");
1.10 }
1.11 @@ -406,6 +407,7 @@
1.12 }
1.13
1.14 void writeNodes(WriterBase<Node>* nodeWriter) {
1.15 + if (node_writers.size() == 0) return;
1.16 if (nodeWriter == 0) {
1.17 throw DataFormatError("Cannot find node id map");
1.18 }
1.19 @@ -418,6 +420,7 @@
1.20 }
1.21
1.22 void writeEdges(WriterBase<Edge>* edgeWriter) {
1.23 + if (edge_writers.size() == 0) return;
1.24 if (edgeWriter == 0) {
1.25 throw DataFormatError("Cannot find node id map");
1.26 }