From 13da3dd830fa1a73b13c25366e5c51030ecef0af Mon Sep 17 00:00:00 2001 From: Eivind Kvedalen Date: Sun, 29 Jul 2018 19:37:23 +0200 Subject: [PATCH] Revert "fixes #0003361: Spreadsheet: Inserting Row Cause Crash - FC Daily v0.17" This reverts commit f485a0786f238b1c555b2dc8a5d511d5cf8c3e24. --- src/Mod/Spreadsheet/App/PropertySheet.cpp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/Mod/Spreadsheet/App/PropertySheet.cpp b/src/Mod/Spreadsheet/App/PropertySheet.cpp index c277340d77..051834d183 100644 --- a/src/Mod/Spreadsheet/App/PropertySheet.cpp +++ b/src/Mod/Spreadsheet/App/PropertySheet.cpp @@ -358,9 +358,7 @@ Cell * PropertySheet::cellAt(CellAddress address) // address actually inside a merged cell if (j != mergedCells.end()) { std::map::const_iterator i = data.find(j->second); - //assert(i != data.end()); - if (i == data.end()) - return nullptr; + assert(i != data.end()); return i->second; } @@ -380,9 +378,7 @@ const Cell * PropertySheet::cellAt(CellAddress address) const // address actually inside a merged cell if (j != mergedCells.end()) { std::map::const_iterator i = data.find(j->second); - //assert(i != data.end()); - if (i == data.end()) - return nullptr; + assert(i != data.end()); return i->second; } @@ -889,9 +885,7 @@ void PropertySheet::getSpans(CellAddress address, int & rows, int & cols) const if (i != mergedCells.end()) { CellAddress anchor = i->second; - const Cell* cell = cellAt(anchor); - if (cell) - cell->getSpans(rows, cols); + cellAt(anchor)->getSpans(rows, cols); } else { rows = cols = 1;