Release text storage only if text view class is MMTextView

This commit is contained in:
Bjorn Winckler
2008-08-14 19:24:09 +02:00
parent 03c5dada39
commit d70f67e5b9
+1 -2
View File
@@ -158,8 +158,7 @@ enum {
// HACK! The text storage is the principal owner of the text system, but we
// keep only a reference to the text view, so release the text storage
// first (unless we are using the ATSUI renderer).
if (![[NSUserDefaults standardUserDefaults]
boolForKey:MMAtsuiRendererKey])
if ([textView isKindOfClass:[MMTextView class]])
[[textView textStorage] release];
[textView release]; textView = nil;