1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-11-29 07:24:13 +01:00

LP-109 fix crash when using PFD Video without gstreamer support

This commit is contained in:
Philippe Renon 2017-09-12 22:13:48 +02:00
parent ddbabc4bf0
commit f78d161dc3

View File

@ -84,7 +84,7 @@ public:
imageSource = new ImageSource();
}
}
return imageSource->createImage(imageUrl);
return imageSource ? imageSource->createImage(imageUrl) : 0;
}
void updateImageFile()
@ -96,8 +96,12 @@ public:
{
osg::Image *image = loadImage();
if (!image) {
return;
}
// qDebug() << "OSGImageNode::update" << image;
osg::Node *geode = createGeodeForImage(image);
osg::Node *geode = createGeodeForImage(image);
self->setNode(geode);
}