summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libass/ass_fontselect.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libass/ass_fontselect.c b/libass/ass_fontselect.c
index c2686bd..955d5f6 100644
--- a/libass/ass_fontselect.c
+++ b/libass/ass_fontselect.c
@@ -560,6 +560,11 @@ static char *select_font(ASS_FontSelector *priv, ASS_Library *library,
if (score == 0)
break;
}
+
+ // The list of names is sorted by priority. If we matched anything,
+ // we can and should stop.
+ if (selected != NULL)
+ break;
}
// found anything?