diff --git a/sc/source/core/data/documen5.cxx b/sc/source/core/data/documen5.cxx index 4076b431ef7b..d89be232d223 100644 --- a/sc/source/core/data/documen5.cxx +++ b/sc/source/core/data/documen5.cxx @@ -688,6 +688,9 @@ std::vector, Rectangle> > ScDoc continue; uno::Reference< chart2::XChartDocument > xChartDoc( ScChartHelper::GetChartFromSdrObject( pObject ) ); + if(!xChartDoc.is()) + continue; + Rectangle aRect = pObject->GetLastBoundRect(); aRet.push_back(std::pair, Rectangle>(xChartDoc, aRect)); } diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx index 338405a43745..80b7e77347e5 100644 --- a/sc/source/ui/view/tabvwsh4.cxx +++ b/sc/source/ui/view/tabvwsh4.cxx @@ -581,7 +581,10 @@ void ScTabViewShell::AddOpenGLChartWindows() for(std::vector, Rectangle> >::iterator itr = aCharts.begin(), itrEnd = aCharts.end(); itr != itrEnd; ++itr) { + if(!itr->first.is()) + return; OpenGLWindow* pOpenGLWindow = new OpenGLWindow(pParentWindow); + pOpenGLWindow->Show(false); Size aSize = itr->second.GetSize(); Size aWindowSize = pOpenGLWindow->LogicToPixel( aSize, MapMode( MAP_100TH_MM ) );