bug 74702 - Issue with bool OutputDevice::IsNativeControlSupported(ControlType, ControlPart)

Adrien Ollier adr.ollier at hotmail.fr
Mon Apr 15 07:33:24 UTC 2019


Hello everybody,

working on bug #74702<https://bugs.documentfoundation.org/show_bug.cgi?id=74702> led me to read file core/vcl/source/outdev/nativecontrols.cxx.

I think there is an issue here:

[cid:679fb8e4-9553-43c2-8c2b-0c2e2a238558]

If mpGraphics == nullptr and AcquireGraphics() == false, then the second if does not return false and we execute the instruction of the return statement but this will lead to a crash (because mpGraphics is false in this scenario).

If the second if is correct, then the last instruction sould be:
​return mpGraphics ? mpGraphics->IsSupported(nType, nPart) : false;

What do you think about that ? Do you agree with me ?

Adrien Ollier
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice/attachments/20190415/8884bc18/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: IsNativeControlSupported.PNG
Type: image/png
Size: 10161 bytes
Desc: IsNativeControlSupported.PNG
URL: <https://lists.freedesktop.org/archives/libreoffice/attachments/20190415/8884bc18/attachment.png>


More information about the LibreOffice mailing list