aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/primbackup.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/primbackup.cpp')
-rw-r--r--linden/indra/newview/primbackup.cpp20
1 files changed, 17 insertions, 3 deletions
diff --git a/linden/indra/newview/primbackup.cpp b/linden/indra/newview/primbackup.cpp
index a534cef..29b635e 100644
--- a/linden/indra/newview/primbackup.cpp
+++ b/linden/indra/newview/primbackup.cpp
@@ -632,6 +632,8 @@ void primbackup::export_next_texture()
632 632
633void primbackup::import_object(bool upload) 633void primbackup::import_object(bool upload)
634{ 634{
635
636
635 textures.clear(); 637 textures.clear();
636 assetmap.clear(); 638 assetmap.clear();
637 current_asset=LLUUID::null; 639 current_asset=LLUUID::null;
@@ -648,9 +650,21 @@ void primbackup::import_object(bool upload)
648 std::string file_name = file_picker.getFirstFile().c_str(); 650 std::string file_name = file_picker.getFirstFile().c_str();
649 folder = gDirUtilp->getDirName(file_name); 651 folder = gDirUtilp->getDirName(file_name);
650 652
651 llifstream import_file(file_name); 653 {
652 LLSDSerialize::fromXML(llsd, import_file); 654 LLSD import_llsd;
653 import_file.close(); 655 llifstream import_file(file_name);
656 S32 status;
657 status = LLSDSerialize::fromXML(import_llsd, import_file);
658 import_file.close();
659
660 if (LLSDParser::PARSE_FAILURE == status)
661 {
662 llwarns << "invalid xml file." << llendl;
663 return;
664 }
665
666 llsd = import_llsd;
667 }
654 668
655 show(); 669 show();
656 670