From 6f0c6513da3599f73802d297a30276011a80e422 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Zi=C4=85bek?= Date: Wed, 31 Mar 2021 13:00:29 +0200 Subject: [PATCH 1/2] Bugfix: exception when providing null content into the Text element --- QuestPDF/Fluent/ElementExtensions.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/QuestPDF/Fluent/ElementExtensions.cs b/QuestPDF/Fluent/ElementExtensions.cs index 0cc0b6e..91c5c08 100644 --- a/QuestPDF/Fluent/ElementExtensions.cs +++ b/QuestPDF/Fluent/ElementExtensions.cs @@ -95,6 +95,7 @@ namespace QuestPDF.Fluent public static void Text(this IContainer element, object text, TextStyle? style = null) { + text ??= string.Empty; style ??= TextStyle.Default; if (element is Alignment alignment) @@ -149,4 +150,4 @@ namespace QuestPDF.Fluent return condition ? element : new Container(); } } -} \ No newline at end of file +} From 4e3ba1d8782bfd7259d5107331ec32e59d9e86e0 Mon Sep 17 00:00:00 2001 From: MarcinZiabek Date: Fri, 16 Apr 2021 10:22:41 +0200 Subject: [PATCH 2/2] Fixed wrong import in QuestPDF.Examples.csproj --- QuestPDF.Examples/QuestPDF.Examples.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/QuestPDF.Examples/QuestPDF.Examples.csproj b/QuestPDF.Examples/QuestPDF.Examples.csproj index e7fea32..129c714 100644 --- a/QuestPDF.Examples/QuestPDF.Examples.csproj +++ b/QuestPDF.Examples/QuestPDF.Examples.csproj @@ -13,7 +13,7 @@ - +