From 0d3a37439625e60cf247228412007fabd04ad289 Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Sat, 25 May 2019 11:59:16 +0200 Subject: Call virtual member Fl_Surface_Device::end_current() when necessary Rename member function Fl_Surface_Device::end_current_() to end_current(), set it protected, and make it called by the destructor of all classes derived from Fl_Surface_Device that re-implement end_current(). This way, end_current() runs equally if Fl_Surface_Device()::pop_current() is called before or after the drawing surface is deleted. --- src/drivers/Android/Fl_Android_Graphics_Driver.H | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/drivers/Android') diff --git a/src/drivers/Android/Fl_Android_Graphics_Driver.H b/src/drivers/Android/Fl_Android_Graphics_Driver.H index 67327d4c6..26d0c8509 100644 --- a/src/drivers/Android/Fl_Android_Graphics_Driver.H +++ b/src/drivers/Android/Fl_Android_Graphics_Driver.H @@ -58,7 +58,7 @@ private: virtual void draw_fixed(Fl_Pixmap * pxm,int XP, int YP, int WP, int HP, int cx, int cy) override; virtual void draw_fixed(Fl_Bitmap *bm, int XP, int YP, int WP, int HP, int cx, int cy) override; // some platforms may need to reimplement this - // This is called from the surface device, see: end_current_() + // This is called from the surface device, see: end_current() // super: virtual void set_current_(); protected: /** Sets the current value of the scaling factor */ -- cgit v1.2.3