From 90068b5cc764f7b7199dfd2e1394b79e5badafd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9a=20Saviot?= Date: Wed, 31 Jan 2018 10:32:07 +0100 Subject: [PATCH] [poincare] Fix Matrix copy bug. When selecting a matrix in the calculation history and pressing 'OK', in the apps Calculation, there was a nullptr bug. Change-Id: I8f05771b76bcb3c68b51cf8ca33a49011144abf9 --- escher/src/scrollable_expression_view_with_cursor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/escher/src/scrollable_expression_view_with_cursor.cpp b/escher/src/scrollable_expression_view_with_cursor.cpp index fd0f07a1b..c80e887a8 100644 --- a/escher/src/scrollable_expression_view_with_cursor.cpp +++ b/escher/src/scrollable_expression_view_with_cursor.cpp @@ -199,7 +199,7 @@ void ScrollableExpressionViewWithCursor::insertLayoutAtCursor(Poincare::Expressi return; } KDSize previousSize = minimalSizeForOptimalDisplay(); - if (layout->isMatrix() && pointedLayout->hasAncestor(layout)) { + if (layout->isMatrix() && pointedLayout && pointedLayout->hasAncestor(layout)) { static_cast(layout)->addGreySquares(); } if (pointedLayout != nullptr) {