[Libreoffice-commits] core.git: forms/source framework/source include/osl
Mike Kaganski
mike.kaganski at collabora.com
Wed Apr 10 05:08:59 UTC 2019
Hi Thorsten,
On 10.04.2019 2:11, Thorsten Behrens wrote:
>
>> --- a/include/osl/mutex.hxx
>> +++ b/include/osl/mutex.hxx
>> @@ -178,11 +178,9 @@ namespace osl
>> */
>> void clear()
>> {
>> - if(pT)
>> - {
>> - pT->release();
>> - pT = NULL;
>> - }
>> + assert(pT);
>> + pT->release();
>> + pT = NULL;
>> }
>> };
>>
> This will have unsuspecting consumers of our API crash if they don't
> catch the assertion during development. I'm not sure that's a positive
> thing to impose on our ecosystem (where LibreOffice support might
> already not be a priority).
>
> I'd be much happier with the pT check still present, but guarded by
> !LIBO_INTERNAL_ONLY.
Please check the discussion at https://gerrit.libreoffice.org/70381: in
fact, my original intention was just that, and it was implemented to
only assert in debug builds.
--
Best regards,
Mike Kaganski
More information about the LibreOffice
mailing list