summaryrefslogtreecommitdiffstats
path: root/WebCore/svg/SVGList.h
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/svg/SVGList.h')
-rw-r--r--WebCore/svg/SVGList.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/WebCore/svg/SVGList.h b/WebCore/svg/SVGList.h
index d4f7641..5381598 100644
--- a/WebCore/svg/SVGList.h
+++ b/WebCore/svg/SVGList.h
@@ -96,7 +96,11 @@ namespace WebCore {
Item insertItemBefore(Item newItem, unsigned int index, ExceptionCode&)
{
- m_vector.insert(index, newItem);
+ if (index < m_vector.size()) {
+ m_vector.insert(index, newItem);
+ } else {
+ m_vector.append(newItem);
+ }
return newItem;
}