From 0a7d4be1b8c9b60d44e1feae0be104fc9e315c7d Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Sat, 3 Mar 2012 11:27:41 +1100 Subject: Fix crash caused by NULL pointer for SCI_MOVESELECTEDLINESDOWN. Bug #3496403. --- src/Document.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/Document.cxx b/src/Document.cxx index a0dc7f54c..fd71a1363 100644 --- a/src/Document.cxx +++ b/src/Document.cxx @@ -976,7 +976,7 @@ bool Document::InsertChar(int pos, char ch) { * Insert a null terminated string. */ bool Document::InsertCString(int position, const char *s) { - return InsertString(position, s, static_cast(strlen(s))); + return InsertString(position, s, static_cast(s ? strlen(s) : 0)); } void Document::ChangeChar(int pos, char ch) { -- cgit v1.2.3