Mercurial > octave-nkf
diff libgui/graphics/__init_qt__.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 | 3fa35defe495 |
children | 3cc0734283dc |
line wrap: on
line diff
--- a/libgui/graphics/__init_qt__.cc Tue Mar 17 20:10:01 2015 -0400 +++ b/libgui/graphics/__init_qt__.cc Tue Mar 17 20:16:16 2015 -0400 @@ -49,6 +49,8 @@ { if (qApp) { + gh_manager::auto_lock lock; + qRegisterMetaType<graphics_object> ("graphics_object"); gh_manager::enable_event_processing (true); @@ -96,6 +98,8 @@ { if (qtHandlesInitialized) { + gh_manager::auto_lock lock; + octave_add_atexit_function ("__shutdown_qt__"); gtk_manager::unload_toolkit ("qt");