diff options
| author | Manolo Gouy <Manolo> | 2015-05-30 13:46:59 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2015-05-30 13:46:59 +0000 |
| commit | 01587b308d2700f23f3c5f635f42e989c380149e (patch) | |
| tree | 8db75cb58f614021e461d661a2830b657bfa7296 /src | |
| parent | 2987b6a02bc7e8365b8791cce2ba0fe30d96ea9f (diff) | |
Mac OS: allow using fl_color(r,g,b) without drawing context.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10739 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
| -rw-r--r-- | src/fl_color_mac.cxx | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/fl_color_mac.cxx b/src/fl_color_mac.cxx index 52957d4d7..4699ef31d 100644 --- a/src/fl_color_mac.cxx +++ b/src/fl_color_mac.cxx @@ -63,6 +63,7 @@ void Fl_Quartz_Graphics_Driver::color(uchar r, uchar g, uchar b) { float fr = r/255.0f; float fg = g/255.0f; float fb = b/255.0f; + if (!fl_gc) return; // no context yet? We will assign the color later. CGContextSetRGBFillColor(fl_gc, fr, fg, fb, 1.0f); CGContextSetRGBStrokeColor(fl_gc, fr, fg, fb, 1.0f); } |
