Commit 11ccafb3 authored by Marco Drache's avatar Marco Drache
Browse files

fix: avoid access errors to non-existent polymerMicrostructure

parent c5d7604f
Loading
Loading
Loading
Loading
Loading
+28 −26
Original line number Diff line number Diff line
@@ -129,6 +129,7 @@ bool Polymer::exportPolymer(ofstream* _os) {
	size_t connectSize = getConnectionCount();
	_os->write((const char*)&connectSize, sizeof(size_t));
	// write connects
	if (connectSize > 0) {
		for (auto& elem : polymerMicrostructure->fragmentConnects) {
			bool fragmentFound = false;
			uint32_t indexFragment1 = 0;
@@ -160,6 +161,7 @@ bool Polymer::exportPolymer(ofstream* _os) {
			ConnectType cType = elem->getType();
			_os->write((const char*)&cType, sizeof(ConnectType));
		}
	}
	return true;
}