diff options
author | Matúš Kukan <matus.kukan@collabora.com> | 2014-05-14 22:44:43 +0200 |
---|---|---|
committer | Matúš Kukan <matus.kukan@collabora.com> | 2014-05-19 09:30:14 +0200 |
commit | 9ccef311aae891daf4436e6d89117bfae3d95959 (patch) | |
tree | b7c6d583c13b7e3438b8383b4fcad6b64935a483 /avmedia | |
parent | GPU Calc:Fixed compiling warning in opbase.cxx&op_math.cxx (diff) | |
download | core-9ccef311aae891daf4436e6d89117bfae3d95959.tar.gz core-9ccef311aae891daf4436e6d89117bfae3d95959.zip |
Do not throw if there is no "images" child in json file tree.
Change-Id: I0b47ed00fecad84859ba3f1751407696878203fb
Diffstat (limited to 'avmedia')
-rw-r--r-- | avmedia/source/framework/modeltools.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/avmedia/source/framework/modeltools.cxx b/avmedia/source/framework/modeltools.cxx index ea400a3182e2..9b485529a19c 100644 --- a/avmedia/source/framework/modeltools.cxx +++ b/avmedia/source/framework/modeltools.cxx @@ -71,7 +71,7 @@ static void lcl_EmbedExternals(const OUString& rSourceURL, uno::Reference<embed: // Parse json, read externals' URI and modify this relative URI's so they remain valid in the new context. std::vector<std::string> vExternals; - ptree aTree; + ptree aTree, aEmptyTree; try { json_parser::read_json( sUrl, aTree ); @@ -85,7 +85,7 @@ static void lcl_EmbedExternals(const OUString& rSourceURL, uno::Reference<embed: aTree.put("buffers." + rVal.first + ".path.",sBufferUri.substr(sBufferUri.find_last_of('/')+1)); } // Images for textures - BOOST_FOREACH(ptree::value_type &rVal,aTree.get_child("images")) + BOOST_FOREACH(ptree::value_type &rVal,aTree.get_child("images", aEmptyTree)) { const std::string sImageUri(rVal.second.get<std::string>("path")); vExternals.push_back(sImageUri); |