Commits

Anonymous committed a381b83

sw34bf04: #i115557#: SwFrm::AppendDrawObj: SwFlyFrm may have 0 pUpper

  • Participants
  • Parent commits 2bf9b13

Comments (0)

Files changed (1)

File sw/source/core/layout/fly.cxx

     // Assure the control objects and group objects containing controls are on the control layer
     if ( ::CheckControlLayer( _rNewObj.DrawObj() ) )
     {
-        const IDocumentDrawModelAccess* pIDDMA = GetUpper()->GetFmt()->getIDocumentDrawModelAccess();
+        const IDocumentDrawModelAccess* pIDDMA = (IsFlyFrm())
+            ? static_cast<SwFlyFrm*>(this)->GetFmt()->
+                    getIDocumentDrawModelAccess()
+            : GetUpper()->GetFmt()->getIDocumentDrawModelAccess();
         const SdrLayerID aCurrentLayer(_rNewObj.DrawObj()->GetLayer());
         const SdrLayerID aControlLayerID(pIDDMA->GetControlsId());
         const SdrLayerID aInvisibleControlLayerID(pIDDMA->GetInvisibleControlsId());