Fix allocation-less launches.

Change-Id: I6d6b46c55f3e88a810ebe51def3ebaccb1fd3fa2
diff --git a/cpu_ref/rsCpuScript.cpp b/cpu_ref/rsCpuScript.cpp
index fb87dd1..30b530b 100644
--- a/cpu_ref/rsCpuScript.cpp
+++ b/cpu_ref/rsCpuScript.cpp
@@ -546,6 +546,10 @@
         mtls->fep.dim.y = outType->getDimY();
         mtls->fep.dim.z = outType->getDimZ();
 
+    } else if (sc != nullptr) {
+        mtls->fep.dim.x = sc->xEnd;
+        mtls->fep.dim.y = sc->yEnd;
+        mtls->fep.dim.z = 0;
     } else {
         mCtx->getContext()->setError(RS_ERROR_BAD_SCRIPT,
                                      "rsForEach called with null allocations");