diff options
author | nyamatongwe <unknown> | 2003-02-08 10:06:16 +0000 |
---|---|---|
committer | nyamatongwe <unknown> | 2003-02-08 10:06:16 +0000 |
commit | 76e9ea6cd657adee6738adcff0d4ba41e5c2057b (patch) | |
tree | 6b599eb39a5a928aec5ffaf59d963e65a4e85f5a | |
parent | 55504132fba2ac41b1cec653dace6aaf31aa697e (diff) | |
download | scintilla-mirror-76e9ea6cd657adee6738adcff0d4ba41e5c2057b.tar.gz |
Avoiding problem at widget destruction time.
-rw-r--r-- | gtk/ScintillaGTK.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx index ef4d5b0e3..7e93a66b2 100644 --- a/gtk/ScintillaGTK.cxx +++ b/gtk/ScintillaGTK.cxx @@ -1424,7 +1424,11 @@ gint ScintillaGTK::KeyRelease(GtkWidget *, GdkEventKey * /*event*/) { } void ScintillaGTK::Destroy(GtkObject* object) { - ScintillaGTK *sciThis = ScintillaFromWidget(GTK_WIDGET(object)); + ScintillaObject *scio = reinterpret_cast<ScintillaObject *>(object); + // This avoids a double destruction - don't know why this happens + if (!scio->pscin) + return; + ScintillaGTK *sciThis = reinterpret_cast<ScintillaGTK *>(scio->pscin); //Platform::DebugPrintf("Destroying %x %x\n", sciThis, object); sciThis->Finalise(); @@ -1432,6 +1436,7 @@ void ScintillaGTK::Destroy(GtkObject* object) { (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); delete sciThis; + scio->pscin = 0; } static void DrawChild(GtkWidget *widget, GdkRectangle *area) { |