From e6f61f3bbc9c863e36126c277d461bd3a3d39c69 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 24 May 2017 11:38:38 +0200 Subject: [PATCH] When trying to convert None to RGBA, log it and return a usable default contributes to #1869 --- plugins/CuraEngineBackend/ProcessSlicedLayersJob.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/CuraEngineBackend/ProcessSlicedLayersJob.py b/plugins/CuraEngineBackend/ProcessSlicedLayersJob.py index f7be2edc04..afd4739ecf 100644 --- a/plugins/CuraEngineBackend/ProcessSlicedLayersJob.py +++ b/plugins/CuraEngineBackend/ProcessSlicedLayersJob.py @@ -31,6 +31,9 @@ catalog = i18nCatalog("cura") # # \param color_code html color code, i.e. "#FF0000" -> red def colorCodeToRGBA(color_code): + if color_code is None: + Logger.log("w", "Unable to convert color code, returning default") + return [0, 0, 0, 1] return [ int(color_code[1:3], 16) / 255, int(color_code[3:5], 16) / 255,