diff --git a/layout/base/nsCSSFrameConstructor.cpp b/layout/base/nsCSSFrameConstructor.cpp index 4666f8fe82a..4892cb87c5f 100644 --- a/layout/base/nsCSSFrameConstructor.cpp +++ b/layout/base/nsCSSFrameConstructor.cpp @@ -5073,6 +5073,10 @@ nsCSSFrameConstructor::FindInputData(nsIContent* aContent, nsCOMPtr control = do_QueryInterface(aContent); NS_ASSERTION(control, "input doesn't implement nsIFormControl?"); + if (!control) { // Speculative parsing is screwing up somehow, dammit + return nsnull; + } + return FindDataByInt(control->GetType(), aContent, aStyleContext, sInputData, NS_ARRAY_LENGTH(sInputData)); }