Add nil-check for the input string when initializing the parser

This commit is contained in:
iska
2015-04-08 20:41:40 +02:00
parent 2f58d1364a
commit 7ca60ea53a
+1 -1
View File
@@ -78,7 +78,7 @@
_stackOfOpenElements = [HTMLStackOfOpenElements new];
_listOfActiveFormattingElements = [HTMLListOfActiveFormattingElements new];
_tokenizer = [[HTMLTokenizer alloc] initWithString:string];
_tokenizer = [[HTMLTokenizer alloc] initWithString:string ?: @""];
_tokenizer.parser = self;
_pendingTableCharacterTokens = [[HTMLCharacterToken alloc] initWithString:@""];