adium 3006:ce8a17cc6a79: If we don't have a content's source, av...

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


details:	http://hg.adium.im/adium/rev/ce8a17cc6a79
revision:	3006:ce8a17cc6a79
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.
(transplanted from a0c0e3c22eab9d7f26f143c049a7fe332e5ef6de)

diffs (17 lines):

diff -r 823d4c46e01a -r ce8a17cc6a79 Plugins/WebKit Message View/AIWebkitMessageViewStyle.m
--- a/Plugins/WebKit Message View/AIWebkitMessageViewStyle.m	Mon Nov 30 19:54:22 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