diff -r c2de2ed28e59 -r 15cf1fd6a505 gui/mapstorage.cc --- a/gui/mapstorage.cc Mon Dec 19 14:58:09 2005 +0000 +++ b/gui/mapstorage.cc Mon Dec 19 16:59:05 2005 +0000 @@ -212,6 +212,22 @@ ContentReader content(lreader); lreader.run(); + if (content.nodeSetNum() < 1) + { + Gtk::MessageDialog mdialog("No nodeset found in file."); + mdialog.run(); + clear(); + return 1; + } + + if (content.edgeSetNum() < 1) + { + Gtk::MessageDialog mdialog("No edgeset found in file."); + mdialog.run(); + clear(); + return 1; + } + const std::vector& nodeMapNames = content.nodeSetMaps(0); const std::vector& edgeMapNames = content.edgeSetMaps(0); @@ -256,7 +272,7 @@ } GuiReader gui_reader(greader, this); greader.run(); - } catch (DataFormatError& error) { + } catch (Exception& error) { Gtk::MessageDialog mdialog(error.what()); mdialog.run(); clear();