From d70f67e5b9eb4f4d4975df120b05862c2761b2bb Mon Sep 17 00:00:00 2001 From: Bjorn Winckler Date: Thu, 14 Aug 2008 19:24:09 +0200 Subject: [PATCH] Release text storage only if text view class is MMTextView --- src/MacVim/MMVimView.m | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/MacVim/MMVimView.m b/src/MacVim/MMVimView.m index c76b100a87..79c134befd 100644 --- a/src/MacVim/MMVimView.m +++ b/src/MacVim/MMVimView.m @@ -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;