diff options
Diffstat (limited to 'lib/widgets.cc')
-rw-r--r-- | lib/widgets.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/widgets.cc b/lib/widgets.cc index 1f540f2..91e5904 100644 --- a/lib/widgets.cc +++ b/lib/widgets.cc @@ -113,10 +113,11 @@ mogltk::shape * mogltk::widget::Shaper() { } void mogltk::widget::fulldraw() { - bool was2D; + bool was2D = true; - if (!(was2D = mogltk::engine::glbase_o->is2D())) - mogltk::engine::glbase_o->Enter2DMode(); + if (mogltk::engine::glbase_o) + if (!(was2D = mogltk::engine::glbase_o->is2D())) + mogltk::engine::glbase_o->Enter2DMode(); texture::Unbind(); mogltk::ColorP::Max = WHITE; @@ -165,7 +166,7 @@ void mogltk::Root::draw() { if (dr) dr->draw(this); else - Shaper()->box(GetAX(), GetAY(), GetAX2(), GetAY2());
+ Shaper()->box(GetAX(), GetAY(), GetAX2(), GetAY2()); } void mogltk::Root::setdrawer(drawer * _dr) { |