Fix: Potential NULL pointer dereference in Fl_Image_Surface c'tor (#834)

This commit is contained in:
ManoloFLTK 2023-11-12 08:56:51 +01:00
parent ce9ba4ba08
commit 768dcf2c11

View File

@ -38,7 +38,7 @@
Fl_Image_Surface::Fl_Image_Surface(int w, int h, int high_res, Fl_Offscreen off) : Fl_Widget_Surface(NULL) {
platform_surface = Fl_Image_Surface_Driver::newImageSurfaceDriver(w, h, high_res, off);
platform_surface->image_surface_ = this;
if (platform_surface) driver(platform_surface->driver());
driver(platform_surface->driver());
}