void ID3v1::Tag::setStringHandler(const StringHandler *handler)
{
- if(TagPrivate::stringHandler != &defaultStringHandler)
- delete TagPrivate::stringHandler;
-
- TagPrivate::stringHandler = handler;
+ if (handler)
+ TagPrivate::stringHandler = handler;
+ else
+ TagPrivate::stringHandler = &defaultStringHandler;
}
////////////////////////////////////////////////////////////////////////////////
/*!
* Sets the string handler that decides how the ID3v1 data will be
* converted to and from binary data.
+ * If the parameter \a handler is null, default ISO-8859-1 handler
+ * is restored.
*
* \see StringHandler
*/