From ecf2c1791a53b19f6a39bb1a2bb81cc555185364 Mon Sep 17 00:00:00 2001 From: dayllenger Date: Sat, 14 Oct 2017 23:08:06 +0300 Subject: [PATCH] fix segfault because of _nullDrawable --- src/dlangui/graphics/resources.d | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/dlangui/graphics/resources.d b/src/dlangui/graphics/resources.d index 046d00af..9866023a 100644 --- a/src/dlangui/graphics/resources.d +++ b/src/dlangui/graphics/resources.d @@ -1139,8 +1139,9 @@ class CombinedDrawable : Drawable { this(uint backgroundColor, string backgroundImageId, string borderDescription) { background = (backgroundImageId !is null) ? drawableCache.get(backgroundImageId) : - (!backgroundColor.isFullyTransparentColor) ? new SolidFillDrawable(backgroundColor) : - new EmptyDrawable; + (!backgroundColor.isFullyTransparentColor) ? new SolidFillDrawable(backgroundColor) : null; + if (background is null) + background = new EmptyDrawable; border = borderDescription !is null ? drawableCache.get(borderDescription) : new EmptyDrawable; }