From 8ea5cdce07fbc414e9a37856be48906b54541219 Mon Sep 17 00:00:00 2001
From: DD Liu <liudi@media.mit.edu>
Date: Wed, 2 May 2018 08:49:57 -0400
Subject: [PATCH] Check that costume exists before accessing

---
 src/containers/paint-editor-wrapper.jsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/containers/paint-editor-wrapper.jsx b/src/containers/paint-editor-wrapper.jsx
index e06e46be6..495df1a93 100644
--- a/src/containers/paint-editor-wrapper.jsx
+++ b/src/containers/paint-editor-wrapper.jsx
@@ -73,7 +73,7 @@ const mapStateToProps = (state, {selectedCostumeIndex}) => {
         name: costume && costume.name,
         rotationCenterX: costume && costume.rotationCenterX,
         rotationCenterY: costume && costume.rotationCenterY,
-        imageFormat: costume.dataFormat,
+        imageFormat: costume && costume.dataFormat,
         imageId: editingTarget && `${editingTarget}${costume.skinId}`,
         vm: state.vm
     };
-- 
GitLab