diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2019-05-25 11:59:16 +0200 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2019-05-25 11:59:16 +0200 |
| commit | 0d3a37439625e60cf247228412007fabd04ad289 (patch) | |
| tree | 8eac87f1d763dbea5e68ed869a85f9c25217e447 /src/Fl_Device.cxx | |
| parent | bf50352afe8c8aee3cfe1779474d6b6c1854f56f (diff) | |
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.
Diffstat (limited to 'src/Fl_Device.cxx')
| -rw-r--r-- | src/Fl_Device.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Fl_Device.cxx b/src/Fl_Device.cxx index db632d74c..98d8928a1 100644 --- a/src/Fl_Device.cxx +++ b/src/Fl_Device.cxx @@ -63,7 +63,7 @@ is Fl_Surface_Device::push_current( ) / Fl_Surface_Device::pop_current().*/ void Fl_Surface_Device::set_current(void) { - if (surface_) surface_->end_current_(); + if (surface_) surface_->end_current(); fl_graphics_driver = pGraphicsDriver; surface_ = this; pGraphicsDriver->global_gc(); |
