2007-04-02 Ada Chan <adachan@apple.com>
authoradachan <adachan@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 2 Apr 2007 22:29:45 +0000 (22:29 +0000)
committeradachan <adachan@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 2 Apr 2007 22:29:45 +0000 (22:29 +0000)
        Reviewed by Adele.

        <rdar://5105331> Missing null check in Editor::execCommand
        Added null check.

        * editing/Editor.cpp:
        (WebCore::Editor::execCommand):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@20669 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/editing/Editor.cpp

index c3f42ae..f127a7d 100644 (file)
@@ -1,3 +1,13 @@
+2007-04-02  Ada Chan  <adachan@apple.com>
+
+        Reviewed by Adele.
+
+        <rdar://5105331> Missing null check in Editor::execCommand
+        Added null check.
+
+        * editing/Editor.cpp:
+        (WebCore::Editor::execCommand):
+
 2007-04-02  Justin Garcia  <justin.garcia@apple.com>
 
         Reviewed by darin
index 068d060..4094630 100644 (file)
@@ -1301,6 +1301,9 @@ Editor::~Editor()
 
 bool Editor::execCommand(const AtomicString& command, Event* triggeringEvent)
 {
+    if (!m_frame->document())
+        return false;
+
     static CommandMap* commandMap;
     if (!commandMap)
         commandMap = createCommandMap();