Skip to content

Commit d23696c

Browse files
Avoid NullReferenceException when handling unknown fonts just as Bold fonts.
1 parent 6d73318 commit d23696c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dotnet/src/dotnetcore/GxPdfReportsCS/PDFReportPDFPig.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ public override void GxAttris(string fontName, int fontSize, bool fontBold, bool
349349
if (barcode128AsImage && (
350350
fontName.ToLower().Contains("barcode 128") || fontName.ToLower().Contains("barcode128")
351351
||
352-
baseFontPath.ToLower().Contains("3of9") || baseFontPath.ToLower().Contains("3 of 9")
352+
(!string.IsNullOrEmpty(baseFontPath) && (baseFontPath.ToLower().Contains("3of9") || baseFontPath.ToLower().Contains("3 of 9")))
353353
)
354354
)
355355
{

0 commit comments

Comments
 (0)