From 4e366fef3d0fb1b95386da1b9cb9416b10689a09 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Wed, 26 Feb 2003 10:52:16 +0000 Subject: Patch from Stephan Deibel to prevent Scintilla disrupting the primary selection at creation time. --- gtk/ScintillaGTK.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'gtk') diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx index 403c05e23..28013d48e 100644 --- a/gtk/ScintillaGTK.cxx +++ b/gtk/ScintillaGTK.cxx @@ -897,8 +897,9 @@ void ScintillaGTK::AddToPopUp(const char *label, int cmd, bool enabled) { } bool ScintillaGTK::OwnPrimarySelection() { - return (gdk_selection_owner_get(GDK_SELECTION_PRIMARY) - == GTK_WIDGET(PWidget(wMain))->window); + return ((gdk_selection_owner_get(GDK_SELECTION_PRIMARY) + == GTK_WIDGET(PWidget(wMain))->window) && + (GTK_WIDGET(PWidget(wMain))->window != NULL)); } void ScintillaGTK::ClaimSelection() { -- cgit v1.2.3