diff --git a/content/base/src/nsDocument.cpp b/content/base/src/nsDocument.cpp
index 92c928dfa79c..138ca8a574fd 100644
--- a/content/base/src/nsDocument.cpp
+++ b/content/base/src/nsDocument.cpp
@@ -5344,8 +5344,9 @@ nsDocument::GetAnimationController()
// one and only SVG documents and the like will call this
if (mAnimationController)
return mAnimationController;
- // Refuse to create an Animation Controller if SMIL is disabled
- if (!NS_SMILEnabled())
+ // Refuse to create an Animation Controller if SMIL is disabled, and also
+ // for data documents.
+ if (!NS_SMILEnabled() || mLoadedAsData)
return nsnull;
mAnimationController = NS_NewSMILAnimationController(this);
diff --git a/content/smil/crashtests/529387-1-helper.svg b/content/smil/crashtests/529387-1-helper.svg
new file mode 100644
index 000000000000..7885ab71fd4a
--- /dev/null
+++ b/content/smil/crashtests/529387-1-helper.svg
@@ -0,0 +1,5 @@
+
diff --git a/content/smil/crashtests/529387-1.xhtml b/content/smil/crashtests/529387-1.xhtml
new file mode 100644
index 000000000000..de3dbec34cff
--- /dev/null
+++ b/content/smil/crashtests/529387-1.xhtml
@@ -0,0 +1,7 @@
+
+
+
diff --git a/content/smil/crashtests/crashtests.list b/content/smil/crashtests/crashtests.list
index 4ca09fa7ac0d..2533a13b5aa1 100644
--- a/content/smil/crashtests/crashtests.list
+++ b/content/smil/crashtests/crashtests.list
@@ -2,3 +2,4 @@ load 523188-1.svg
load 525099-1.svg
load 526875-1.svg
load 526875-2.svg
+load 529387-1.xhtml