We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ddbabc4 commit f78d161Copy full SHA for f78d161
1 file changed
ground/gcs/src/libs/osgearth/osgQtQuick/OSGImageNode.cpp
@@ -84,7 +84,7 @@ struct OSGImageNode::Hidden : public QObject {
84
imageSource = new ImageSource();
85
}
86
87
- return imageSource->createImage(imageUrl);
+ return imageSource ? imageSource->createImage(imageUrl) : 0;
88
89
90
void updateImageFile()
@@ -96,8 +96,12 @@ struct OSGImageNode::Hidden : public QObject {
96
{
97
osg::Image *image = loadImage();
98
99
+ if (!image) {
100
+ return;
101
+ }
102
+
103
// qDebug() << "OSGImageNode::update" << image;
- osg::Node *geode = createGeodeForImage(image);
104
+ osg::Node *geode = createGeodeForImage(image);
105
106
self->setNode(geode);
107
0 commit comments