diff --git a/src/netedit/elements/additional/GNEDetector.cpp b/src/netedit/elements/additional/GNEDetector.cpp index 685866cd098..8be8fd675f1 100644 --- a/src/netedit/elements/additional/GNEDetector.cpp +++ b/src/netedit/elements/additional/GNEDetector.cpp @@ -324,7 +324,7 @@ GNEDetector::isDetectorValid(SumoXMLAttr key, const std::string& value) { void GNEDetector::writeDetectorValues(OutputDevice& device) const { - if (myPeriod != SUMOTime_MAX_PERIOD) { + if ((myPeriod > 0) && (myPeriod != SUMOTime_MAX_PERIOD)) { device.writeAttr(SUMO_ATTR_PERIOD, time2string(myPeriod)); } if (myAdditionalName.size() > 0) {