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 | 56f99baecbe0c8c932c6c528b10c3d12d1b7a3b2 (patch) | |
tree | 4a6b310752483badac49975cf0d34221cc3108d3 /src | |
parent | 4b3f565e2a239761d8926cc80d4b48c6f64bb6f2 (diff) | |
download | scintilla-mirror-56f99baecbe0c8c932c6c528b10c3d12d1b7a3b2.tar.gz |
Avoid warning from clang analyze due to potential NULL pointer by asserting
pointer is not NULL.
Diffstat (limited to 'src')
-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); } |