Author: alg
Date: Fri Jun 20 11:51:09 2014
New Revision: 1604147

URL: http://svn.apache.org/r1604147
Log:
i121410 Secured usage of pTextGroup

Modified:
    openoffice/trunk/main/sd/source/ui/animations/CustomAnimationPane.cxx

Modified: openoffice/trunk/main/sd/source/ui/animations/CustomAnimationPane.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/sd/source/ui/animations/CustomAnimationPane.cxx?rev=1604147&r1=1604146&r2=1604147&view=diff
==============================================================================
--- openoffice/trunk/main/sd/source/ui/animations/CustomAnimationPane.cxx 
(original)
+++ openoffice/trunk/main/sd/source/ui/animations/CustomAnimationPane.cxx Fri 
Jun 20 11:51:09 2014
@@ -1786,7 +1786,7 @@ void CustomAnimationPane::changeSelectio
 
                        if( bHasAnimateForm )
                        {
-                               if( pTextGroup->getAnimateForm() != 
bAnimateForm )
+                               if( pTextGroup.get() && 
pTextGroup->getAnimateForm() != bAnimateForm )
                                {
                                        if( (pTextGroup->getTextGrouping() >= 
0) && (nTextGrouping == -1 ) )
                                        {
@@ -1804,22 +1804,25 @@ void CustomAnimationPane::changeSelectio
                        
                        if( bHasTextGrouping )
                        {
-                               if( (pTextGroup->getTextGrouping() != 
nTextGrouping) )
+                               if( pTextGroup.get() && 
pTextGroup->getTextGrouping() != nTextGrouping )
                                {
                                        pEffectSequence->setTextGrouping( 
pTextGroup, nTextGrouping );
                                        bChanged = true;
                                }
                        }
 
-                       if (!bDoSetAnimateFormFirst&&bNeedDoSetAnimateForm)
+                       if (!bDoSetAnimateFormFirst && bNeedDoSetAnimateForm)
                        {
-                               pEffectSequence->setAnimateForm( pTextGroup, 
bAnimateForm );
-                               bChanged = true;
+                if( pTextGroup.get() )
+                {
+                    pEffectSequence->setAnimateForm( pTextGroup, bAnimateForm 
);
+                    bChanged = true;
+                }
                        }
 
                        if( bHasTextGroupingAuto )
                        {
-                               if( pTextGroup->getTextGroupingAuto() != 
fTextGroupingAuto )
+                               if( pTextGroup.get() && 
pTextGroup->getTextGroupingAuto() != fTextGroupingAuto )
                                {
                                        pEffectSequence->setTextGroupingAuto( 
pTextGroup, fTextGroupingAuto );
                                        bChanged = true;
@@ -1828,7 +1831,7 @@ void CustomAnimationPane::changeSelectio
 
                        if( bHasTextReverse )
                        {
-                               if( pTextGroup->getTextReverse() != 
bTextReverse )
+                               if( pTextGroup.get() && 
pTextGroup->getTextReverse() != bTextReverse )
                                {
                                        pEffectSequence->setTextReverse( 
pTextGroup, bTextReverse );
                                        bChanged = true;


Reply via email to