comparison libgui/graphics/Container.cc @ 19989: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 2f4406e9dad6
children 3cc0734283dc
comparison
equal deleted inserted replaced
19988:ed51e17f6ccf 19989:b6061813a693
49 49
50 Canvas* Container::canvas (const graphics_handle& gh, bool xcreate) 50 Canvas* Container::canvas (const graphics_handle& gh, bool xcreate)
51 { 51 {
52 if (! m_canvas && xcreate) 52 if (! m_canvas && xcreate)
53 { 53 {
54 gh_manager::auto_lock lock;
54 graphics_object go = gh_manager::get_object (gh); 55 graphics_object go = gh_manager::get_object (gh);
55 56
56 if (go) 57 if (go)
57 { 58 {
58 graphics_object fig = go.get_ancestor ("figure"); 59 graphics_object fig = go.get_ancestor ("figure");