diff options
author | Neil Hodgson <nyamatongwe@gmail.com> | 2015-04-10 00:09:09 +1000 |
---|---|---|
committer | Neil Hodgson <nyamatongwe@gmail.com> | 2015-04-10 00:09:09 +1000 |
commit | 2105020e5558e0644efa8abe4e3190f45f6d1b2a (patch) | |
tree | 50aac1064f2cf64629d88ffc0f7c855cf8006fad /src/Editor.cxx | |
parent | c0704a47f16b4ae26d7e46335e7c3b44fee7d799 (diff) | |
download | scintilla-mirror-2105020e5558e0644efa8abe4e3190f45f6d1b2a.tar.gz |
Avoid warning from clang analyze due to potential NULL pointer by asserting
pointer is not NULL.
Diffstat (limited to 'src/Editor.cxx')
-rw-r--r-- | src/Editor.cxx | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx index 585acb086..2f2458861 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -2056,6 +2056,7 @@ void Editor::PasteRectangular(SelectionPosition pos, const char *ptr, int len) { sel.RangeMain().caret.SetPosition(PositionFromLineX(line, xInsert)); if ((XFromPosition(sel.MainCaret()) < xInsert) && (i + 1 < len)) { while (XFromPosition(sel.MainCaret()) < xInsert) { + assert(pdoc); const int lengthInserted = pdoc->InsertString(sel.MainCaret(), " ", 1); sel.RangeMain().caret.Add(lengthInserted); } |