diff --git a/src/justify.py b/src/justify.py index 61b71ed2f..b60de0886 100644 --- a/src/justify.py +++ b/src/justify.py @@ -186,9 +186,10 @@ class Line: if not ret: return False - self._variation = hb.variation_t() - self._variation.tag = tag - self._variation.value = value + if tag: + self._variation = hb.variation_t() + self._variation.tag = tag + self._variation.value = value self._words = makewords(buf, self._font, text) if shrink and advance > self._target_advance + wiggle: