From 4ed37a062edb761cbbbd100752da9f9c076c5236 Mon Sep 17 00:00:00 2001 From: samcake Date: Thu, 20 Apr 2017 12:43:14 -0700 Subject: [PATCH 1/2] Protecting the case when a texture is not created at all in the ImageReader --- .../model-networking/src/model-networking/TextureCache.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libraries/model-networking/src/model-networking/TextureCache.cpp b/libraries/model-networking/src/model-networking/TextureCache.cpp index 98b03eba1e..b8d3a51534 100644 --- a/libraries/model-networking/src/model-networking/TextureCache.cpp +++ b/libraries/model-networking/src/model-networking/TextureCache.cpp @@ -559,9 +559,12 @@ void ImageReader::read() { // Load the image into a gpu::Texture auto networkTexture = resource.staticCast(); texture.reset(networkTexture->getTextureLoader()(image, url)); - texture->setSource(url); if (texture) { + texture->setSource(url); texture->setFallbackTexture(networkTexture->getFallbackTexture()); + } else { + qCDebug(modelnetworking) << _url << "loading stopped; texture wasn't created"; + return; } auto textureCache = DependencyManager::get(); From 5a5d475c6c92509e13ce31508da2d5ed1b0790eb Mon Sep 17 00:00:00 2001 From: samcake Date: Fri, 5 Jan 2018 14:03:52 -0800 Subject: [PATCH 2/2] Reinstall the packing of the qrc in the executable in DEV_build --- interface/CMakeLists.txt | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/interface/CMakeLists.txt b/interface/CMakeLists.txt index b3400c8dd0..eebe3efc55 100644 --- a/interface/CMakeLists.txt +++ b/interface/CMakeLists.txt @@ -12,10 +12,8 @@ function(JOIN VALUES GLUE OUTPUT) endfunction() -if (NOT DEV_BUILD) - set(INTERFACE_QML_QRC ${CMAKE_CURRENT_BINARY_DIR}/qml.qrc) - generate_qrc(OUTPUT ${INTERFACE_QML_QRC} PATH ${CMAKE_CURRENT_SOURCE_DIR}/resources GLOBS *.qml *.qss *.js *.html *.ttf *.gif *.svg *.png *.jpg) -endif() +set(INTERFACE_QML_QRC ${CMAKE_CURRENT_BINARY_DIR}/qml.qrc) +generate_qrc(OUTPUT ${INTERFACE_QML_QRC} PATH ${CMAKE_CURRENT_SOURCE_DIR}/resources GLOBS *.qml *.qss *.js *.html *.ttf *.gif *.svg *.png *.jpg) # set a default root dir for each of our optional externals if it was not passed set(OPTIONAL_EXTERNALS "LeapMotion") @@ -82,9 +80,7 @@ qt5_wrap_ui(QT_UI_HEADERS "${QT_UI_FILES}") # add them to the interface source files set(INTERFACE_SRCS ${INTERFACE_SRCS} "${QT_UI_HEADERS}" "${QT_RESOURCES}") -if (NOT DEV_BUILD) list(APPEND INTERFACE_SRCS ${INTERFACE_QML_QRC}) -endif() if (UNIX) install(