Allow block encoders to work with a NULL pointer for the output list structure.

TRAC #23748

Signed-off-by: Nicolas Capens
Signed-off-by: Geoff Lang

diff --git a/src/compiler/BlockLayoutEncoder.cpp b/src/compiler/BlockLayoutEncoder.cpp
index 6d604ba..15aee6c 100644
--- a/src/compiler/BlockLayoutEncoder.cpp
+++ b/src/compiler/BlockLayoutEncoder.cpp
@@ -51,7 +51,11 @@
     getBlockLayoutInfo(field.type, field.arraySize, field.isRowMajorMatrix, &arrayStride, &matrixStride);
 
     const BlockMemberInfo memberInfo(mCurrentOffset * ComponentSize, arrayStride * ComponentSize, matrixStride * ComponentSize, field.isRowMajorMatrix);
-    mBlockInfoOut->push_back(memberInfo);
+
+    if (mBlockInfoOut)
+    {
+        mBlockInfoOut->push_back(memberInfo);
+    }
 
     advanceOffset(field.type, field.arraySize, field.isRowMajorMatrix, arrayStride, matrixStride);
 }
@@ -64,7 +68,11 @@
     getBlockLayoutInfo(type, arraySize, isRowMajorMatrix, &arrayStride, &matrixStride);
 
     const BlockMemberInfo memberInfo(mCurrentOffset * ComponentSize, arrayStride * ComponentSize, matrixStride * ComponentSize, isRowMajorMatrix);
-    mBlockInfoOut->push_back(memberInfo);
+
+    if (mBlockInfoOut)
+    {
+        mBlockInfoOut->push_back(memberInfo);
+    }
 
     advanceOffset(type, arraySize, isRowMajorMatrix, arrayStride, matrixStride);
 }