summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorRick Pasetto <rick@lindenlab.com>2009-12-18 15:52:45 -0800
committerRick Pasetto <rick@lindenlab.com>2009-12-18 15:52:45 -0800
commit3b110e76332712e7efb7972fb27324a763596b6c (patch)
tree051dc5a3821c3269dd1dab6b43072827fe97edf1 /indra
parent4d55b5bad0cfabc4c9bb4e4d7234efc77b3547e8 (diff)
Fix crash when DnD onto an item with media but no impl
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llviewerwindow.cpp19
1 files changed, 16 insertions, 3 deletions
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 6c73cc18db..08f598b288 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -875,7 +875,8 @@ LLWindowCallbacks::DragNDropResult LLViewerWindow::handleDragNDrop( LLWindow *wi
media_data[LLMediaEntry::AUTO_PLAY_KEY] = true;
obj->syncMediaData(object_face, media_data, true, true);
// XXX This shouldn't be necessary, should it ?!?
- obj->getMediaImpl(object_face)->navigateReload();
+ if (obj->getMediaImpl(object_face))
+ obj->getMediaImpl(object_face)->navigateReload();
obj->sendMediaDataUpdate();
result = LLWindowCallbacks::DND_COPY;
@@ -885,8 +886,20 @@ LLWindowCallbacks::DragNDropResult LLViewerWindow::handleDragNDrop( LLWindow *wi
if (te->getMediaData()->checkCandidateUrl(url))
{
// just navigate to the URL
- obj->getMediaImpl(object_face)->navigateTo(url);
-
+ if (obj->getMediaImpl(object_face))
+ {
+ obj->getMediaImpl(object_face)->navigateTo(url);
+ }
+ else {
+ // This is very strange. Navigation should
+ // happen via the Impl, but we don't have one.
+ // This sends it to the server, which /should/
+ // trigger us getting it. Hopefully.
+ LLSD media_data;
+ media_data[LLMediaEntry::CURRENT_URL_KEY] = url;
+ obj->syncMediaData(object_face, media_data, true, true);
+ obj->sendMediaDataUpdate();
+ }
result = LLWindowCallbacks::DND_LINK;
}
}