Commit 057b0fbd authored by cblu's avatar cblu
Browse files

Catch NULL status strings passed to NPN_Status.

        Reviewed by darin.

        * Plugins.subproj/WebBaseNetscapePluginView.m:
        (-[WebBaseNetscapePluginView status:]): check the incoming string before calling [NSString stringWithCString]


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3034 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 15cdfc52
2002-12-13 Chris Blumenberg <cblu@apple.com>
Catch NULL status strings passed to NPN_Status.
Reviewed by darin.
* Plugins.subproj/WebBaseNetscapePluginView.m:
(-[WebBaseNetscapePluginView status:]): check the incoming string before calling [NSString stringWithCString]
2002-12-12 Trey Matteson <trey@apple.com>
3117101 - PLT slows down as history fills up
......
......@@ -984,11 +984,16 @@ -(NPError)destroyStream:(NPStream*)stream reason:(NPReason)reason
}
-(void)status:(const char *)message
{
LOG(Plugins, "NPN_Status: %s", message);
if([self controller]){
[[[self controller] windowOperationsDelegate] setStatusText:[NSString stringWithCString:message]];
{
if (!message) {
ERROR("NPN_Status passed a NULL status message");
return;
}
NSString *status = (NSString *)CFStringCreateWithCString(NULL, message, kCFStringEncodingMacRoman);
LOG(Plugins, "NPN_Status: %@", status);
[[[self controller] windowOperationsDelegate] setStatusText:status];
[status release];
}
-(void)invalidateRect:(NPRect *)invalidRect
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment