--- a/tview.cpp +++ b/tview.cpp @@ -208,7 +208,7 @@ pictureFileName, wxT("SVG vector picture files (*.svg)|*.svg"), wxSAVE|wxOVERWRITE_PROMPT); - if (dialog.ShowModal() == wxID_OK) + if ((dialog.ShowModal() == wxID_OK) && (p.GetNumTrees() != 0)) { wxSVGFileDC pictureDC (dialog.GetPath(), 600, 650) ; OnDraw (&pictureDC);