summaryrefslogtreecommitdiff
path: root/src/drivers/GDI
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers/GDI')
-rw-r--r--src/drivers/GDI/Fl_GDI_Graphics_Driver_rect.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/drivers/GDI/Fl_GDI_Graphics_Driver_rect.cxx b/src/drivers/GDI/Fl_GDI_Graphics_Driver_rect.cxx
index ab416b134..fdff2fe1b 100644
--- a/src/drivers/GDI/Fl_GDI_Graphics_Driver_rect.cxx
+++ b/src/drivers/GDI/Fl_GDI_Graphics_Driver_rect.cxx
@@ -243,8 +243,10 @@ void Fl_GDI_Graphics_Driver::pop_clip() {
void Fl_GDI_Graphics_Driver::restore_clip() {
fl_clip_state_number++;
- Fl_Region r = rstack[rstackptr];
- SelectClipRgn(gc_, r); //if r is NULL, clip is automatically cleared
+ if (gc_) {
+ Fl_Region r = rstack[rstackptr];
+ SelectClipRgn(gc_, r); // if r is NULL, clip is automatically cleared
+ }
}