summaryrefslogtreecommitdiffstats
path: root/macosx/HBTitle.m
diff options
context:
space:
mode:
authorDamiano Galassi <[email protected]>2021-01-06 13:56:58 +0100
committerDamiano Galassi <[email protected]>2021-01-06 13:56:58 +0100
commit70920d85f4efb08eaea9e2ce073e884cdbc6be17 (patch)
tree5b3c61ad08cc3ac6a4126c4b1e4ddb0b08b4e84d /macosx/HBTitle.m
parent2e305eda8ba831384958957fa13e3fd3f59320ee (diff)
MacGui: make sure each chapter has always a non null title, even if the original title has invalid utf8 characters.
Diffstat (limited to 'macosx/HBTitle.m')
-rw-r--r--macosx/HBTitle.m3
1 files changed, 2 insertions, 1 deletions
diff --git a/macosx/HBTitle.m b/macosx/HBTitle.m
index 3591a4df8..59afa4c90 100644
--- a/macosx/HBTitle.m
+++ b/macosx/HBTitle.m
@@ -497,7 +497,8 @@ fail:
{
title = @(chapter->title);
}
- else
+
+ if (title == NULL)
{
title = [NSString stringWithFormat:HBKitLocalizedString(@"Chapter %d", "Title -> chapter name"), i + 1];
}