diff options
| author | Jiří Techet <techet@gmail.com> | 2015-11-13 22:10:23 +0100 |
|---|---|---|
| committer | Jiří Techet <techet@gmail.com> | 2015-11-13 22:10:23 +0100 |
| commit | f30f698ac1d45c47a15a21f36009fe25eec35040 (patch) | |
| tree | e0636036019527691d744616e2e5f3c9acbd8240 | |
| parent | 23460f666bf34479850000eed40ba0ea38ca6665 (diff) | |
| download | scintilla-mirror-f30f698ac1d45c47a15a21f36009fe25eec35040.tar.gz | |
Check for NULL value in ScintillaGTK::ForAll()
| -rw-r--r-- | gtk/ScintillaGTK.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx index ce02e09ca..b5385ec2f 100644 --- a/gtk/ScintillaGTK.cxx +++ b/gtk/ScintillaGTK.cxx @@ -618,8 +618,10 @@ void ScintillaGTK::UnMap(GtkWidget *widget) { void ScintillaGTK::ForAll(GtkCallback callback, gpointer callback_data) { try { (*callback) (PWidget(wText), callback_data); - (*callback) (PWidget(scrollbarv), callback_data); - (*callback) (PWidget(scrollbarh), callback_data); + if (PWidget(scrollbarv)) + (*callback) (PWidget(scrollbarv), callback_data); + if (PWidget(scrollbarh)) + (*callback) (PWidget(scrollbarh), callback_data); } catch (...) { errorStatus = SC_STATUS_FAILURE; } |
