aProfile->SetProfilePoints( aProfilePoints );
// Add profile to the stream
- isOK = AddProfile( aProfile ) && isOK;
+ bool isAdded = AddProfile( aProfile );
+ if ( !isAdded ) {
+ aProfile->Remove();
+ }
+ else
+ aProfile->Update();
}
+ if ( isOK )
+ Update();
+
return isOK;
-}
\ No newline at end of file
+}