From 711366fe825bc3d02cae80772bd46cdac9dbe6a7 Mon Sep 17 00:00:00 2001 From: rowanbeentje Date: Mon, 11 Jul 2011 00:23:08 +0000 Subject: - Fix thread-safety issue in blocking/waiting alert sheets, addressing crashes ( http://spbug.com/l/2035 ), particularly under Lion --- Source/SPAlertSheets.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/SPAlertSheets.m b/Source/SPAlertSheets.m index b9ac1136..41b07e00 100644 --- a/Source/SPAlertSheets.m +++ b/Source/SPAlertSheets.m @@ -161,6 +161,6 @@ void SPBeginWaitingAlertSheet( } - [NSApp endModalSession:session]; - [NSApp endSheet:[alert window]]; + [[NSApp onMainThread] endModalSession:session]; + [[NSApp onMainThread] endSheet:[alert window]]; } -- cgit v1.2.3