diff --git a/ChangeLog b/ChangeLog index cc6320b12..2a7bdf305 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-03-23 Fred Kiefer + + * Source/NSTextContainer.m (-replaceLayoutManager:): Retain the + text storage while replacing the layout manager. See last patch. + 2010-03-23 Fred Kiefer * Source/GSXibLoader.m: Try to be a bit closer to the current NIB diff --git a/Source/NSTextContainer.m b/Source/NSTextContainer.m index 292989e8a..c19dd59fa 100644 --- a/Source/NSTextContainer.m +++ b/Source/NSTextContainer.m @@ -166,6 +166,7 @@ framework intact. GSLayoutManager *oldLayoutManager = _layoutManager; RETAIN(oldLayoutManager); + RETAIN(textStorage); [textStorage removeLayoutManager: _layoutManager]; [textStorage addLayoutManager: aLayoutManager]; @@ -186,6 +187,7 @@ framework intact. [[container textView] setTextContainer: container]; RELEASE(container); } + RELEASE(textStorage); RELEASE(oldLayoutManager); } }