From 8b5cc15679da47be2795ab5a4dcbab062084f7a9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ciar=C3=A1n=20Walsh?= Date: Wed, 25 Jun 2008 00:24:44 +0100 Subject: [PATCH] A crash would occur in the event that -setFile: was called with the same path string object as is currently own * Source/BSSourceView.m: (setFile:) --- Source/BSSourceView.m | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Source/BSSourceView.m b/Source/BSSourceView.m index 489de2f..69a1364 100644 --- a/Source/BSSourceView.m +++ b/Source/BSSourceView.m @@ -50,8 +50,11 @@ */ - (void)setFile:(NSString *)f { - [file release]; - file = [f retain]; + if (file != f) + { + [file release]; + file = [f retain]; + } @try { -- 2.43.5