adium-1.4 2857:a0c0e3c22eab: If we don't have a content's source...

commits at adium.im commits at adium.im
Tue Dec 1 02:26:27 UTC 2009


details:	http://hg.adium.im/adium-1.4/rev/a0c0e3c22eab
revision:	2857:a0c0e3c22eab
author:		Zachary West <zacw at adium.im>
date:		Mon Nov 30 21:26:23 2009 -0500

If we don't have a content's source, avoid completely destroying Adium's state with an assertion.

We'll still display with (unknown) but we won't have extremely odd effects like infinite-loop-logging multiple megabytes of window close messages, invisibly having problems, etc.

diffs (17 lines):

diff -r afd127c0a25c -r a0c0e3c22eab Plugins/WebKit Message View/AIWebkitMessageViewStyle.m
--- a/Plugins/WebKit Message View/AIWebkitMessageViewStyle.m	Mon Nov 30 20:36:16 2009 -0500
+++ b/Plugins/WebKit Message View/AIWebkitMessageViewStyle.m	Mon Nov 30 21:26:23 2009 -0500
@@ -928,8 +928,11 @@
 						if (!senderDisplay) {
 							senderDisplay = formattedUID;
 							if (!senderDisplay) {
-								AILog(@"wtf. we don't have a sender for %@ (%@)", content, [content message]);
-								NSAssert1(senderDisplay, @"Sender has no known display name that we can use! displayName and formattedUID were both nil for sender %@", contentSource);
+								AILog(@"XXX we don't have a sender for %@ (%@)", content, [content message]);
+								NSLog(@"Enormous error: we don't have a sender for %@ (%@)", content, [content message]);
+								
+								// This shouldn't happen.
+								senderDisplay = @"(unknown)";
 							}
 						}
 					}




More information about the commits mailing list