From 7d59736ed6edf725a136c74998e43bc3d1f9cb86 Mon Sep 17 00:00:00 2001 From: Garux Date: Tue, 14 Apr 2020 19:45:00 +0300 Subject: [PATCH] print info on gdk_pixbuf_new_from_file() error --- libs/gtkutil/image.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libs/gtkutil/image.cpp b/libs/gtkutil/image.cpp index d8fb0bdd..b578b838 100644 --- a/libs/gtkutil/image.cpp +++ b/libs/gtkutil/image.cpp @@ -39,8 +39,11 @@ void BitmapsPath_set( const char* path ){ } GdkPixbuf* pixbuf_new_from_file_with_mask( const char* filename ){ - GdkPixbuf* rgb = gdk_pixbuf_new_from_file( filename, 0 ); + GError *error = nullptr; + GdkPixbuf* rgb = gdk_pixbuf_new_from_file( filename, &error ); if ( rgb == 0 ) { + globalErrorStream() << "ERROR: gdk_pixbuf_new_from_file(): " << error->message << "\n"; + g_error_free( error ); return 0; } else