if ( ioWindowInfo == NULL || ioWindowInfo->mWindow == NULL || gRDFService == NULL  )
if ( !ioWindowInfo || !(ioWindowInfo->mWindow) || !gRDFService )
nsresult nsWindowMediator::AddWindowToRDF( nsWindowInfo* ioWindowInfo ){	if ( ioWindowInfo == NULL || ioWindowInfo->mWindow == NULL || gRDFService == NULL  )		return NS_ERROR_NULL_POINTER;			nsCOMPtr<nsIRDFResource> window;	nsresult rv;			nsString	windowTitle;		// Make up a unique ID and create the RDF NODE	nsString uniqueID = "window-";	uniqueID.Append(windowTitle );	uniqueID.Append( mTimeStamp, 10 );	char cID[ 256];	uniqueID.ToCString( cID, 256);	if (NS_FAILED(rv = gRDFService->GetResource(cID, getter_AddRefs(window) )))	{		NS_ERROR("unable to get window resource");		return rv;	}	ioWindowInfo->mRDFID = window ;			// Get the RDF literal and add it to our node 	nsCOMPtr<nsIRDFLiteral> windowTitleLiteral;	if (NS_FAILED(rv = gRDFService->GetLiteral( windowTitle.GetUnicode(), getter_AddRefs(windowTitleLiteral))))	{		NS_ERROR("unable to create literal for window name");		return rv;	}	rv = Assert(window, kNC_Name, windowTitleLiteral, PR_TRUE);    if (rv != NS_RDF_ASSERTION_ACCEPTED)	{		NS_ERROR("unable to set window name");		return rv;	}		// Add the element to the container  nsCOMPtr<nsIRDFContainer> container;  rv = NS_NewRDFContainer(mInner, kNC_WindowMediatorRoot, getter_AddRefs(container));  if (NS_FAILED(rv))  	return rv;	if (NS_FAILED(rv = container->AppendElement( window ) ) /* rdf_ContainerAppendElement(mInner, kNC_WindowMediatorRoot, window) */ )	{		NS_ERROR("unable to add window to container");		return rv;	}	return NS_OK;}