diff options
-rw-r--r-- | gtk/ScintillaGTK.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
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() { |