Fix wxCriticalSectionLocker usage
A temporary object will not hold the lock
This commit is contained in:
@@ -516,7 +516,7 @@ wxPropertyGrid::~wxPropertyGrid()
|
|||||||
size_t i;
|
size_t i;
|
||||||
|
|
||||||
#if wxUSE_THREADS
|
#if wxUSE_THREADS
|
||||||
wxCriticalSectionLocker(wxPGGlobalVars->m_critSect);
|
wxCriticalSectionLocker lock(wxPGGlobalVars->m_critSect);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -6368,7 +6368,7 @@ void wxPropertyGridEvent::OnPropertyGridSet()
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
#if wxUSE_THREADS
|
#if wxUSE_THREADS
|
||||||
wxCriticalSectionLocker(wxPGGlobalVars->m_critSect);
|
wxCriticalSectionLocker lock(wxPGGlobalVars->m_critSect);
|
||||||
#endif
|
#endif
|
||||||
m_pg->m_liveEvents.push_back(this);
|
m_pg->m_liveEvents.push_back(this);
|
||||||
}
|
}
|
||||||
@@ -6380,7 +6380,7 @@ wxPropertyGridEvent::~wxPropertyGridEvent()
|
|||||||
if ( m_pg )
|
if ( m_pg )
|
||||||
{
|
{
|
||||||
#if wxUSE_THREADS
|
#if wxUSE_THREADS
|
||||||
wxCriticalSectionLocker(wxPGGlobalVars->m_critSect);
|
wxCriticalSectionLocker lock(wxPGGlobalVars->m_critSect);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Use iterate from the back since it is more likely that the event
|
// Use iterate from the back since it is more likely that the event
|
||||||
|
Reference in New Issue
Block a user