Bug 199714 NPE with invalid url[0002]
viewer/org.eclipse.birt.report.viewer/birt/WEB-INF/classes/org/eclipse/birt/report/service/BirtViewerReportService.java
public ToC getTOC( String docName, String tocId, InputOptions options )
			throws ReportServiceException
	{
		IReportDocument doc = ReportEngineService.getInstance( )
				.openReportDocument( getReportDesignName( options ), docName,
						getModuleOptions( options ) );
		TOCNode node = null;
		if ( doc != null )
		{
			Locale locale = null;
			if ( options != null )
				locale = (Locale) options.getOption( InputOptions.OPT_LOCALE );
			if ( locale == null )
				locale = Locale.getDefault( );
			ITOCTree tocTree = doc.getTOCTree(
					DesignChoiceConstants.FORMAT_TYPE_VIEWER, ULocale
							.forLocale( locale ) );
			if ( tocId != null )
			{
				node = tocTree.findTOC( tocId );
			}
			else
			{
				node = tocTree.findTOC( null );
			}
		}
		if ( node == null )
		{
			if ( doc != null )
				doc.close( );