diff --git a/layout/style/ServoBindings.cpp b/layout/style/ServoBindings.cpp index 51b387c642bb..b96494a61a75 100644 --- a/layout/style/ServoBindings.cpp +++ b/layout/style/ServoBindings.cpp @@ -2832,9 +2832,14 @@ Gecko_ReportUnexpectedCSSError(ErrorReporter* reporter, } } - nsDependentCSubstring paramValue(param, paramLen); - nsAutoString wideParam = NS_ConvertUTF8toUTF16(paramValue); - reporter->ReportUnexpectedUnescaped(message, wideParam); + if (param) { + nsDependentCSubstring paramValue(param, paramLen); + nsAutoString wideParam = NS_ConvertUTF8toUTF16(paramValue); + reporter->ReportUnexpectedUnescaped(message, wideParam); + } else { + reporter->ReportUnexpected(message); + } + if (suffix) { reporter->ReportUnexpected(suffix); }