summaryrefslogtreecommitdiff
path: root/vcl/unx/gtk/window
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2004-10-13 07:57:47 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2004-10-13 07:57:47 +0000
commit1a7ed7a1f125aa582bf6500a86382abc37149c35 (patch)
treec4f469eaa7a48f3aea1f503b7d38fa55e9e48304 /vcl/unx/gtk/window
parent462c6d80f466ba700c65546c83f88439e25409c6 (diff)
INTEGRATION: CWS vcl27 (1.3.100); FILE MERGED
2004/09/09 13:58:29 pl 1.3.100.1: #i32682# avoid accessing widget after destroy signal
Diffstat (limited to 'vcl/unx/gtk/window')
-rw-r--r--vcl/unx/gtk/window/gtkobject.cxx20
1 files changed, 16 insertions, 4 deletions
diff --git a/vcl/unx/gtk/window/gtkobject.cxx b/vcl/unx/gtk/window/gtkobject.cxx
index e2e703e128c2..3183d2515ac6 100644
--- a/vcl/unx/gtk/window/gtkobject.cxx
+++ b/vcl/unx/gtk/window/gtkobject.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: gtkobject.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: hr $ $Date: 2004-05-10 15:53:24 $
+ * last change: $Author: hr $ $Date: 2004-10-13 08:57:47 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -101,6 +101,7 @@ GtkSalObject::GtkSalObject( GtkSalFrame* pParent )
g_signal_connect( G_OBJECT(m_pSocket), "button-release-event", G_CALLBACK(signalButton), this );
g_signal_connect( G_OBJECT(m_pSocket), "focus-in-event", G_CALLBACK(signalFocus), this );
g_signal_connect( G_OBJECT(m_pSocket), "focus-out-event", G_CALLBACK(signalFocus), this );
+ g_signal_connect( G_OBJECT(m_pSocket), "destroy", G_CALLBACK(signalDestroy), this );
}
}
@@ -120,7 +121,8 @@ GtkSalObject::~GtkSalObject()
void GtkSalObject::ResetClipRegion()
{
- gdk_window_shape_combine_region( m_pSocket->window, NULL, 0, 0 );
+ if( m_pSocket )
+ gdk_window_shape_combine_region( m_pSocket->window, NULL, 0, 0 );
}
USHORT GtkSalObject::GetClipRegionType()
@@ -148,7 +150,8 @@ void GtkSalObject::UnionClipRegion( long nX, long nY, long nWidth, long nHeight
void GtkSalObject::EndSetClipRegion()
{
- gdk_window_shape_combine_region( m_pSocket->window, m_pRegion, 0, 0 );
+ if( m_pSocket )
+ gdk_window_shape_combine_region( m_pSocket->window, m_pRegion, 0, 0 );
}
void GtkSalObject::SetPosSize( long nX, long nY, long nWidth, long nHeight )
@@ -218,3 +221,12 @@ gboolean GtkSalObject::signalFocus( GtkWidget* pWidget, GdkEventFocus* pEvent, g
return FALSE;
}
+
+void GtkSalObject::signalDestroy( GtkObject* pObj, gpointer object )
+{
+ GtkSalObject* pThis = (GtkSalObject*)object;
+ if( GTK_WIDGET(pObj) == pThis->m_pSocket )
+ {
+ pThis->m_pSocket = NULL;
+ }
+}