diff --git a/editor/base/nsEditor.cpp b/editor/base/nsEditor.cpp index 846cc9ca2431..49a7a3e63364 100644 --- a/editor/base/nsEditor.cpp +++ b/editor/base/nsEditor.cpp @@ -852,7 +852,7 @@ NS_IMETHODIMP nsEditor::Paste() nsresult rv = nsServiceManager::GetService(kCClipboardCID, kIClipboardIID, (nsISupports **)&clipboard); - nsITransferable * trans; + nsITransferable * trans = 0; rv = nsComponentManager::CreateInstance(kCTransferableCID, nsnull, kITransferableIID, (void**) &trans); if (nsnull != trans) { diff --git a/editor/libeditor/base/nsEditor.cpp b/editor/libeditor/base/nsEditor.cpp index 846cc9ca2431..49a7a3e63364 100644 --- a/editor/libeditor/base/nsEditor.cpp +++ b/editor/libeditor/base/nsEditor.cpp @@ -852,7 +852,7 @@ NS_IMETHODIMP nsEditor::Paste() nsresult rv = nsServiceManager::GetService(kCClipboardCID, kIClipboardIID, (nsISupports **)&clipboard); - nsITransferable * trans; + nsITransferable * trans = 0; rv = nsComponentManager::CreateInstance(kCTransferableCID, nsnull, kITransferableIID, (void**) &trans); if (nsnull != trans) {