bug 74702 - Issue with bool OutputDevice::IsNativeControlSupported(ControlType, ControlPart)
mikekaganski at hotmail.com
Mon Apr 15 07:38:47 UTC 2019
On 15.04.2019 10:33, Adrien Ollier wrote:
> 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:
> 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).
No, please check what AcquireGraphics() does. Namely, it is used here to
acquire mpGraphics when it's not yet available. In fact, lines 166-167
are equivalent to this: "if (!mpGraphics) AcquireGraphics(); if
(!mpGraphics) return false;"
More information about the LibreOffice