aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2012-03-03 11:27:41 +1100
committernyamatongwe <devnull@localhost>2012-03-03 11:27:41 +1100
commitdf978e8fb788b2f0bdcde10635730c83e1119054 (patch)
tree4550fb48b1e0dde88ce63d2f72ac50faff03adaf
parentee89d788a07c384e193f396657175f674c0be221 (diff)
downloadscintilla-mirror-df978e8fb788b2f0bdcde10635730c83e1119054.tar.gz
Fix crash caused by NULL pointer for SCI_MOVESELECTEDLINESDOWN. Bug #3496403.
-rw-r--r--src/Document.cxx2
1 files changed, 1 insertions, 1 deletions
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<int>(strlen(s)));
+ return InsertString(position, s, static_cast<int>(s ? strlen(s) : 0));
}
void Document::ChangeChar(int pos, char ch) {