From 97b049d37f76758e96ad756850591c81e449c860 Mon Sep 17 00:00:00 2001 From: daid303 Date: Mon, 11 Feb 2013 13:27:02 +0100 Subject: [PATCH] Do not crash if the ini is malformed. --- Cura/util/profile.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Cura/util/profile.py b/Cura/util/profile.py index 76755226..3575f31c 100644 --- a/Cura/util/profile.py +++ b/Cura/util/profile.py @@ -432,7 +432,11 @@ def getMachineCenterCoords(): return [getPreferenceFloat('machine_width') / 2, getPreferenceFloat('machine_depth') / 2] def getObjectMatrix(): - return map(float, getProfileSetting('model_matrix').split(',')) + try: + return map(float, getProfileSetting('model_matrix').split(',')) + except ValueError: + return [1,0,0, 0,1,0, 0,0,1] + ######################################################### ## Alteration file functions -- 2.30.2