Mercurial > hg > octave-nkf
diff libgui/graphics/Figure.cc @ 20163:b6061813a693
always obtain gh_manager lock before accessing graphics objects
* Canvas.cc (Canvas::print, Canvas::updateCurrentPoint): Use
gh_manager::auto_lock before accessing object.
* Container.cc (Container::canvas): Likewise.
* ContextMenu.cc (ContextMenu::executeAt): Likewise.
* Figure.cc (hasUiControlChildren, hasUiMenuChildren): Likewise.
* GLCanvas.cc (GLCanvas::draw): Likewise.
* Object.cc (Object::objectDestroyed): Likewise.
* __init_qt__.cc (__init__, __shutdown__): Likewise.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 17 Mar 2015 20:16:16 -0400 |
parents | 815db217f6f4 |
children | b57b7f3f5e61 |
line wrap: on
line diff
--- a/libgui/graphics/Figure.cc +++ b/libgui/graphics/Figure.cc @@ -60,6 +60,8 @@ static bool hasUiControlChildren (const figure::properties& fp) { + gh_manager::auto_lock lock; + Matrix kids = fp.get_all_children (); for (int i = 0; i < kids.numel (); i++) @@ -76,6 +78,8 @@ static bool hasUiMenuChildren (const figure::properties& fp) { + gh_manager::auto_lock lock; + Matrix kids = fp.get_all_children (); for (int i = 0; i < kids.numel (); i++)