Fix some coverity issues

This commit is contained in:
Ingo Weyrich
2019-08-09 15:45:52 +02:00
parent 63abfb4d66
commit 9293e8e69b
4 changed files with 7 additions and 7 deletions

View File

@@ -220,7 +220,7 @@ Cairo::RefPtr<Cairo::ImageSurface> RTScalable::loadImage(const Glib::ustring &fn
GError **error = nullptr;
RsvgHandle *handle = rsvg_handle_new_from_data((unsigned const char*)updatedSVG.c_str(), updatedSVG.length(), error);
if (handle == nullptr) {
if (error && !handle) {
std::cerr << "ERROR: Can't use the provided data for \"" << fname << "\" to create a RsvgHandle:" << std::endl
<< Glib::ustring((*error)->message) << std::endl;
Cairo::RefPtr<Cairo::ImageSurface> surf = Cairo::ImageSurface::create(Cairo::FORMAT_RGB24, 10, 10);