This forum is temporaily read-only. All existing discussions remain available for reference. For new questions, bug reports or support requests, please contact us at mail@lmdsupport.com.

Missing Check in LMDPNgImage

In Methode TLMDPNGChunkIHDR.PrepareImageData

The line

  ImageHandle := CreateDIBSection(ImageDC, pBitmapInfo(@BitmapInfo)^, DIB_RGB_COLORS, ImageData, 0, 0);

could get a 0-Handle an Null-Pointer on ImageData if the drawing is very big.

I add following line

  if ImageHandle = 0 then
    RaiseLastOSError;

the get a better error message instead of a access violation.

Comments

Sign In or Register to comment.