Created
July 9, 2016 05:16
-
-
Save codebrainz/8ea8534a3dc72b5de1944168ef92dfbd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/scintilla/gtk/ScintillaGTK.cxx b/scintilla/gtk/ScintillaGTK.cxx | |
index 92fc064..bf66928 100644 | |
--- a/scintilla/gtk/ScintillaGTK.cxx | |
+++ b/scintilla/gtk/ScintillaGTK.cxx | |
@@ -546,8 +546,10 @@ void ScintillaGTK::UnRealizeThis(GtkWidget *widget) { | |
GTK_WIDGET_UNSET_FLAGS(widget, GTK_REALIZED); | |
#endif | |
gtk_widget_unrealize(PWidget(wText)); | |
- gtk_widget_unrealize(PWidget(scrollbarv)); | |
- gtk_widget_unrealize(PWidget(scrollbarh)); | |
+ if (GTK_IS_WIDGET(PWidget(scrollbarv))) | |
+ gtk_widget_unrealize(PWidget(scrollbarv)); | |
+ if (GTK_IS_WIDGET(PWidget(scrollbarh))) | |
+ gtk_widget_unrealize(PWidget(scrollbarh)); | |
gtk_widget_unrealize(PWidget(wPreedit)); | |
gtk_widget_unrealize(PWidget(wPreeditDraw)); | |
g_object_unref(im_context); | |
@@ -611,8 +613,10 @@ void ScintillaGTK::UnMapThis() { | |
DropGraphics(false); | |
gdk_window_hide(PWindow(wMain)); | |
gtk_widget_unmap(PWidget(wText)); | |
- gtk_widget_unmap(PWidget(scrollbarh)); | |
- gtk_widget_unmap(PWidget(scrollbarv)); | |
+ if (GTK_IS_WIDGET(PWidget(scrollbarh))) | |
+ gtk_widget_unmap(PWidget(scrollbarh)); | |
+ if (GTK_IS_WIDGET(PWidget(scrollbarv))) | |
+ gtk_widget_unmap(PWidget(scrollbarv)); | |
} catch (...) { | |
errorStatus = SC_STATUS_FAILURE; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment