fix segfault because of _nullDrawable

This commit is contained in:
dayllenger 2017-10-14 23:08:06 +03:00
parent b8f8f97634
commit ecf2c1791a
1 changed files with 3 additions and 2 deletions

View File

@ -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;
}