Kams wrote:
hello everyone..
i m trying to create a new profile in forefox 1.5 with the help of
nsIToolkitProfileService interface.. it compiles well.. but crashes at
run time... here is a code snippet...
hope to get some light in this regard...
/********************************************************************/
nsCOMPtr<nsIToolkitProfileService> profileSvc
(do_GetService(NS_PROFILESERVICE_CONTRACTID));
This is going to fail. The "toolkit profile service" is only available
during the initial startup sequence if it needs to show the profile manager.
As a rule you should always rv- or null-check XPCOM calls such as do_GetService.
--BDS
_______________________________________________
dev-tech-xpcom mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-xpcom