summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Power <noel.power@novell.com>2011-11-14 11:23:24 +0000
committerNoel Power <noel.power@novell.com>2011-11-14 11:23:24 +0000
commitd7bcd952360da96271881e776eb74edc55067eb3 (patch)
tree09f37fa3003ab19d84e7806b57bd9e30ff1cca26
parentcdb2e8c531efd22420d8e5df91841bf881f28a7f (diff)
Revert "fix crash at exit ( access of deleted GtkSalDisplay instance ) bnc#728603"libreoffice-3-4-4feature/onemsi
This reverts commit cdb2e8c531efd22420d8e5df91841bf881f28a7f. Ooops was on the wrong branch
-rw-r--r--vcl/unx/gtk/app/gtkdata.cxx44
1 files changed, 15 insertions, 29 deletions
diff --git a/vcl/unx/gtk/app/gtkdata.cxx b/vcl/unx/gtk/app/gtkdata.cxx
index a1c8b2fce1..6a61098b98 100644
--- a/vcl/unx/gtk/app/gtkdata.cxx
+++ b/vcl/unx/gtk/app/gtkdata.cxx
@@ -576,14 +576,6 @@ GtkXLib::~GtkXLib()
#endif
Yield( true, true );
StopTimer();
-
- if (m_pUserEvent)
- {
- g_source_destroy (m_pUserEvent);
- g_source_unref (m_pUserEvent);
- m_pUserEvent = NULL;
- }
-
// sanity check: at this point nobody should be yielding, but wake them
// up anyway before the condition they're waiting on gets destroyed.
osl_setCondition( m_aDispatchCondition );
@@ -800,36 +792,30 @@ extern "C"
gboolean GtkXLib::userEventFn(gpointer data)
{
-
- gboolean bContinue = FALSE;
+ gboolean bContinue;
GtkXLib *pThis = (GtkXLib *) data;
+ SalData *pSalData = GetSalData();
- GtkData *pGtkData = static_cast<GtkData*>(GetSalData());
-
- pGtkData->m_pInstance->GetYieldMutex()->acquire();
+ pSalData->m_pInstance->GetYieldMutex()->acquire();
+ pThis->m_pGtkSalDisplay->EventGuardAcquire();
- if ( pGtkData->GetDisplay() )
+ if( !pThis->m_pGtkSalDisplay->HasMoreEvents() )
{
- pThis->m_pGtkSalDisplay->EventGuardAcquire();
-
- if( !pThis->m_pGtkSalDisplay->HasMoreEvents() )
+ if( pThis->m_pUserEvent )
{
- if( pThis->m_pUserEvent )
- {
- g_source_unref (pThis->m_pUserEvent);
- pThis->m_pUserEvent = NULL;
- }
- bContinue = FALSE;
+ g_source_unref (pThis->m_pUserEvent);
+ pThis->m_pUserEvent = NULL;
}
- else
- bContinue = TRUE;
+ bContinue = FALSE;
+ }
+ else
+ bContinue = TRUE;
- pThis->m_pGtkSalDisplay->EventGuardRelease();
+ pThis->m_pGtkSalDisplay->EventGuardRelease();
- pThis->m_pGtkSalDisplay->DispatchInternalEvent();
+ pThis->m_pGtkSalDisplay->DispatchInternalEvent();
- pGtkData->m_pInstance->GetYieldMutex()->release();
- }
+ pSalData->m_pInstance->GetYieldMutex()->release();
return bContinue;
}