diff --git a/widget/src/xlib/nsClipboard.cpp b/widget/src/xlib/nsClipboard.cpp index cb05625c4277..49cf261372da 100644 --- a/widget/src/xlib/nsClipboard.cpp +++ b/widget/src/xlib/nsClipboard.cpp @@ -309,7 +309,9 @@ NS_IMETHODIMP nsClipboard::GetData(nsITransferable *aTransferable, // Get which transferable we should use. NS_IF_RELEASE(mTransferable); mTransferable = GetTransferable(aWhichClipboard); - NS_IF_ADDREF(mTransferable); + NS_ASSERTION(!mTransferable,"mTransferable is null!! see bug 80181"); + if (!mTransferable) return NS_ERROR_FAILURE; + NS_ADDREF(mTransferable); // If we currently own the selection, we will handle the paste // internally, otherwise get the data from the X server