You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by ch...@apache.org on 2012/06/13 04:08:56 UTC

svn commit: r1349609 - /incubator/ooo/trunk/main/sw/source/core/edit/edattr.cxx

Author: chengjh
Date: Wed Jun 13 02:08:55 2012
New Revision: 1349609

URL: http://svn.apache.org/viewvc?rev=1349609&view=rev
Log:
Fix issue #i119959: Crash if undo/redo pasted text from shape to empty para with bullets

* sw/source/core/edit/edattr.cxx
   pointer checking

Patch by: chengjh@apache.org
Suggested by: chengjh@apache.org
Found by: Yan Ji <ya...@gmail.com>
Review by: zhengfan <zh...@gmail.com>           

Modified:
    incubator/ooo/trunk/main/sw/source/core/edit/edattr.cxx

Modified: incubator/ooo/trunk/main/sw/source/core/edit/edattr.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sw/source/core/edit/edattr.cxx?rev=1349609&r1=1349608&r2=1349609&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sw/source/core/edit/edattr.cxx (original)
+++ incubator/ooo/trunk/main/sw/source/core/edit/edattr.cxx Wed Jun 13 02:08:55 2012
@@ -429,6 +429,13 @@ sal_Bool lcl_IsNoEndTxtAttrAtPos( const 
             ASSERT( rTNd.GetNumRule(),
                     "<lcl_IsNoEndTxtAttrAtPos(..)> - no list style found at text node. Serious defect -> please inform OD." );
             const SwNumRule* pNumRule = rTNd.GetNumRule();
+			//Modified for i119959,2012.6.12
+			//Under this scenario,this pointer is null,but on win,it doesn't crash immediately
+			//it exits with exception,and associated memory will have problem which leads to crash problem in 
+			//other place in dev env...
+			if ( pNumRule )
+			{
+			//End
             const SwNumFmt &rNumFmt = pNumRule->Get( static_cast<sal_uInt16>(rTNd.GetActualListLevel()) );
             if( SVX_NUM_BITMAP != rNumFmt.GetNumberingType() )
             {
@@ -436,7 +443,13 @@ sal_Bool lcl_IsNoEndTxtAttrAtPos( const 
                     sExp = rNumFmt.GetBulletChar();
                 else
                     sExp = rTNd.GetNumString();
-            }
+				}
+			//Modified for i119959,2012.6.12
+			//Under this scenario,this pointer is null,but on win,it doesn't crash immediately
+			//it exits with exception,and associated memory will have problem which leads to crash problem in 
+			//other place in dev env...
+			}
+			//End
         }
     }