diff options
Diffstat (limited to 'linden/indra/newview/llwebbrowserctrl.cpp')
-rw-r--r-- | linden/indra/newview/llwebbrowserctrl.cpp | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/linden/indra/newview/llwebbrowserctrl.cpp b/linden/indra/newview/llwebbrowserctrl.cpp index 763f73d..79f5a21 100644 --- a/linden/indra/newview/llwebbrowserctrl.cpp +++ b/linden/indra/newview/llwebbrowserctrl.cpp | |||
@@ -88,17 +88,20 @@ LLWebBrowserCtrl::LLWebBrowserCtrl( const std::string& name, const LLRect& rect | |||
88 | if ( !mMediaSource ) | 88 | if ( !mMediaSource ) |
89 | { | 89 | { |
90 | llwarns << "media source create failed " << llendl; | 90 | llwarns << "media source create failed " << llendl; |
91 | return; | 91 | // return; |
92 | } | 92 | } |
93 | else | ||
94 | { | ||
93 | 95 | ||
94 | // mMediaSource->init(); | 96 | // mMediaSource->init(); |
95 | mMediaSource->addCommand( LLMediaBase::COMMAND_START ); | 97 | mMediaSource->addCommand( LLMediaBase::COMMAND_START ); |
96 | 98 | ||
97 | // observe the browser so we can trap HREF events) | 99 | // observe the browser so we can trap HREF events) |
98 | mMediaSource->addObserver(this); | 100 | mMediaSource->addObserver(this); |
99 | 101 | ||
100 | // create a new texture (based on LLDynamic texture) that will be used to display the output | 102 | // create a new texture (based on LLDynamic texture) that will be used to display the output |
101 | mWebBrowserImage = new LLWebBrowserTexture( screen_width, screen_height, this, mMediaSource ); | 103 | mWebBrowserImage = new LLWebBrowserTexture( screen_width, screen_height, this, mMediaSource ); |
104 | } | ||
102 | 105 | ||
103 | LLRect border_rect( 0, getRect().getHeight() + 2, getRect().getWidth() + 2, 0 ); | 106 | LLRect border_rect( 0, getRect().getHeight() + 2, getRect().getWidth() + 2, 0 ); |
104 | mBorder = new LLViewBorder( "web control border", border_rect, LLViewBorder::BEVEL_IN ); | 107 | mBorder = new LLViewBorder( "web control border", border_rect, LLViewBorder::BEVEL_IN ); |
@@ -409,14 +412,20 @@ bool LLWebBrowserCtrl::canNavigateForward() | |||
409 | 412 | ||
410 | bool LLWebBrowserCtrl::set404RedirectUrl( std::string redirect_url ) | 413 | bool LLWebBrowserCtrl::set404RedirectUrl( std::string redirect_url ) |
411 | { | 414 | { |
412 | return mMediaSource->set404RedirectUrl( redirect_url ); | 415 | if(mMediaSource) |
416 | return mMediaSource->set404RedirectUrl( redirect_url ); | ||
417 | else | ||
418 | return false; | ||
413 | } | 419 | } |
414 | 420 | ||
415 | //////////////////////////////////////////////////////////////////////////////// | 421 | //////////////////////////////////////////////////////////////////////////////// |
416 | // | 422 | // |
417 | bool LLWebBrowserCtrl::clr404RedirectUrl() | 423 | bool LLWebBrowserCtrl::clr404RedirectUrl() |
418 | { | 424 | { |
419 | return mMediaSource->clr404RedirectUrl(); | 425 | if(mMediaSource) |
426 | return mMediaSource->clr404RedirectUrl(); | ||
427 | else | ||
428 | return false; | ||
420 | } | 429 | } |
421 | 430 | ||
422 | //////////////////////////////////////////////////////////////////////////////// | 431 | //////////////////////////////////////////////////////////////////////////////// |