From 80cd28ee3e86dad7e5cabfd64d06e7c180561e3d Mon Sep 17 00:00:00 2001 From: stepan-beresnev Date: Sat, 8 Nov 2014 13:36:47 +0000 Subject: [PATCH] Filters constructors threw exceptions if context was lost --- starling/src/starling/filters/FragmentFilter.as | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/starling/src/starling/filters/FragmentFilter.as b/starling/src/starling/filters/FragmentFilter.as index 2e3479579..776de4ca6 100644 --- a/starling/src/starling/filters/FragmentFilter.as +++ b/starling/src/starling/filters/FragmentFilter.as @@ -144,7 +144,7 @@ package starling.filters mIndexData = new [0, 1, 2, 1, 3, 2]; mIndexData.fixed = true; - createPrograms(); + if (Starling.current.contextValid) createPrograms(); // Handle lost context. By using the conventional event, we can make it weak; this // avoids memory leaks when people forget to call "dispose" on the filter.