summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
Diffstat (limited to 'desktop')
-rw-r--r--desktop/browser.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/desktop/browser.c b/desktop/browser.c
index e7d39fd8b..3fe16f54c 100644
--- a/desktop/browser.c
+++ b/desktop/browser.c
@@ -1456,26 +1456,27 @@ nserror browser_window_callback(hlcache_handle *c,
{
/* Content wants drag save of a content */
struct browser_window *root = browser_window_get_root(bw);
+ hlcache_handle *save = event->data.dragsave.content;
+
+ if (save == NULL) {
+ save = c;
+ }
switch(event->data.dragsave.type) {
case CONTENT_SAVE_ORIG:
- gui_drag_save_object(GUI_SAVE_OBJECT_ORIG,
- event->data.dragsave.content,
+ gui_drag_save_object(GUI_SAVE_OBJECT_ORIG, save,
root->window);
break;
case CONTENT_SAVE_NATIVE:
- gui_drag_save_object(GUI_SAVE_OBJECT_NATIVE,
- event->data.dragsave.content,
+ gui_drag_save_object(GUI_SAVE_OBJECT_NATIVE, save,
root->window);
break;
case CONTENT_SAVE_COMPLETE:
- gui_drag_save_object(GUI_SAVE_COMPLETE,
- event->data.dragsave.content,
+ gui_drag_save_object(GUI_SAVE_COMPLETE, save,
root->window);
break;
case CONTENT_SAVE_SOURCE:
- gui_drag_save_object(GUI_SAVE_SOURCE,
- event->data.dragsave.content,
+ gui_drag_save_object(GUI_SAVE_SOURCE, save,
root->window);
break;
}