Skip to content

Commit 333885b

Browse files
committed
Fix NullReferenceException in ChangeDeclarations
1 parent 0652a66 commit 333885b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/AngleSharp.Css/Dom/Internal/CssStyleDeclaration.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,9 @@ private void RemovePropertyByName(String propertyName)
377377

378378
private void ChangeDeclarations(IEnumerable<ICssProperty> decls, Predicate<ICssProperty> defaultSkip, Func<ICssProperty, ICssProperty, Boolean> removeExisting)
379379
{
380+
if (decls == null)
381+
return;
382+
380383
var declarations = new List<ICssProperty>();
381384

382385
foreach (var newdecl in decls)

0 commit comments

Comments
 (0)