From 56f99baecbe0c8c932c6c528b10c3d12d1b7a3b2 Mon Sep 17 00:00:00 2001 From: Neil Hodgson Date: Fri, 10 Apr 2015 00:09:09 +1000 Subject: Avoid warning from clang analyze due to potential NULL pointer by asserting pointer is not NULL. --- src/Editor.cxx | 1 + 1 file changed, 1 insertion(+) (limited to 'src') 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); } -- cgit v1.2.3