FLEX-34611: Application crash when textFlow property set to null with preserveSelection
diff --git a/textLayout/src/flashx/textLayout/container/TextContainerManager.as b/textLayout/src/flashx/textLayout/container/TextContainerManager.as
index d67524a..04d8366 100644
--- a/textLayout/src/flashx/textLayout/container/TextContainerManager.as
+++ b/textLayout/src/flashx/textLayout/container/TextContainerManager.as
@@ -578,7 +578,7 @@
hadPreviousSelection = true;
//preserve the selection state [bug #2931406 from Flex SDK]
- if (_preserveSelectionOnSetText)
+ if (_preserveSelectionOnSetText && text)
{
oldAnchorPosition = Math.min(_textFlow.interactionManager.anchorPosition, text.length);
oldActivePosition = Math.min(_textFlow.interactionManager.activePosition, text.length);