[not part of build] Fix for bug #108054, guard against NULL url parameter.

This commit is contained in:
beard%netscape.com 2001-11-08 23:28:47 +00:00
Родитель 4452668ccb
Коммит 693a1bfb9a
1 изменённых файлов: 9 добавлений и 6 удалений

Просмотреть файл

@ -1249,12 +1249,15 @@ void ShowDocumentMessage::execute()
static void showDocumentCallback(jobject applet, CFURLRef url, CFStringRef windowName, void *inUserData)
{
// use a timer on the main event loop to handle this?
MRJContext* context = reinterpret_cast<MRJContext*>(inUserData);
ShowDocumentMessage* message = new ShowDocumentMessage(context->getInstance(), url, windowName);
if (message) {
OSStatus status = message->send();
if (status != noErr) delete message;
// workaround for bug #108054, sometimes url parameter is NULL.
if (url) {
// use a timer on the main event loop to handle this?
MRJContext* context = reinterpret_cast<MRJContext*>(inUserData);
ShowDocumentMessage* message = new ShowDocumentMessage(context->getInstance(), url, windowName);
if (message) {
OSStatus status = message->send();
if (status != noErr) delete message;
}
}
}