summaryrefslogtreecommitdiff
path: root/src/drivers/Android/Fl_Android_Graphics_Driver.cxx
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2018-03-10 16:22:44 +0000
committerMatthias Melcher <fltk@matthiasm.com>2018-03-10 16:22:44 +0000
commit1cf4371b6908492952c0ef789e9f7566557d3cf1 (patch)
treee0326b21d3703c23095577ee23ed6fb5739a28ed /src/drivers/Android/Fl_Android_Graphics_Driver.cxx
parent5591ba811aab2fc67255a4bc469e86ecc1fad37d (diff)
Android: fixed some variables to avoid crashing.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12730 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/drivers/Android/Fl_Android_Graphics_Driver.cxx')
-rw-r--r--src/drivers/Android/Fl_Android_Graphics_Driver.cxx12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/drivers/Android/Fl_Android_Graphics_Driver.cxx b/src/drivers/Android/Fl_Android_Graphics_Driver.cxx
index 2a0b62cc8..b71f1adbb 100644
--- a/src/drivers/Android/Fl_Android_Graphics_Driver.cxx
+++ b/src/drivers/Android/Fl_Android_Graphics_Driver.cxx
@@ -54,10 +54,14 @@ static uint16_t make565(Fl_Color crgba)
}
void Fl_Android_Graphics_Driver::rectf_unscaled(float x, float y, float w, float h) {
- Fl_Android_Application::log_w("rectf %g %g %g %g", x, y, w, h);
- Fl_Rect_Region r(x, y, w, h);
- if (r.intersect_with(&pWindowRegion)) {
- rectf_unclipped(r.x(), r.y(), r.w(), r.h());
+ if (pWindowRegion) {
+ Fl_Android_Application::log_w("rectf %g %g %g %g", x, y, w, h);
+ Fl_Rect_Region r(x, y, w, h);
+ if (r.intersect_with(pWindowRegion)) {
+ rectf_unclipped(r.x(), r.y(), r.w(), r.h());
+ }
+ } else {
+ rectf_unclipped(x, y, w, h);
}
/*