author | francesco-ST <francesco.abbate@st.com> | 2010年09月03日 14:07:29 +0200 |
---|---|---|
committer | francesco-ST <francesco.abbate@st.com> | 2010年09月03日 14:07:29 +0200 |
commit | 665467b1fdcec90ddad2b8b4043fe57e550ebaa2 (patch) | |
tree | 1847a02fe7794e1f3144bdd64d16a8d69d1c1ebf /agg-plot/window.cpp | |
parent | 9a592c9ad1662190cbd77f6a1cf465045f9f7baa (diff) | |
download | gsl-shell-665467b1fdcec90ddad2b8b4043fe57e550ebaa2.tar.gz |
-rw-r--r-- | agg-plot/window.cpp | 17 |
diff --git a/agg-plot/window.cpp b/agg-plot/window.cpp index 58863bb2..0d7f6c8b 100644 --- a/agg-plot/window.cpp +++ b/agg-plot/window.cpp @@ -164,12 +164,17 @@ window::refresh_slot_by_ref(ref& ref) this->scale(mtx); agg::rect_base<double> bb; - plot_type::iterator *current = ref.plot->drawing_start(); - while (ref.plot->draw_queue(*m_canvas, mtx, bb, current)) - { - agg::rect_base<int> bbw(bb.x1 - 4, bb.y1 - 4, bb.x2 + 4, bb.y2 + 4); - platform_support_update_region (this, bbw); - } + AGG_LOCK(); + try { + plot_type::iterator *current = ref.plot->drawing_start(); + while (ref.plot->draw_queue(*m_canvas, mtx, bb, current)) + { + agg::rect_base<int> bbw(bb.x1 - 4, bb.y1 - 4, bb.x2 + 4, bb.y2 + 4); + platform_support_update_region (this, bbw); + } + } + catch (std::bad_alloc&) { } + AGG_UNLOCK(); } void |