From a2cc923a026776dab0cf06b97ee60fb5249bfee8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9a=20Saviot?= Date: Fri, 13 Mar 2020 16:45:57 +0100 Subject: [PATCH] [apps/code] Fix assertion --- apps/code/python_text_area.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/code/python_text_area.cpp b/apps/code/python_text_area.cpp index d3ab068ef..54e0fe390 100644 --- a/apps/code/python_text_area.cpp +++ b/apps/code/python_text_area.cpp @@ -164,8 +164,8 @@ void PythonTextArea::ContentView::drawLine(KDContext * ctx, int line, const char // Redraw the autocompleted word in the right color const char * autocompleteStart = m_cursorLocation; - assert(autocompleteStart != text); - if (m_autocomplete && autocompleteStart > text && autocompleteStart < text + byteLength) { + assert(!m_autocomplete || autocompleteStart != text); + if (m_autocomplete && autocompleteStart > text && autocompleteStart < text + byteLength) { const char * autocompleteEnd = UTF8Helper::EndOfWord(autocompleteStart); drawStringAt( ctx,