diff -ru libr-0.6.0~maverick/src/libr-icons.c libr-0.6.0/src/libr-icons.c --- libr-0.6.0~maverick/src/libr-icons.c 2011-03-02 22:22:33.000000000 +0000 +++ libr-0.6.0/src/libr-icons.c 2012-09-12 20:08:35.000000000 +0000 @@ -330,18 +330,20 @@ if(entry->type == LIBR_SVG) { libr_icon *icon = libr_icon_geticon_byname(handle, entry->name); - libr_icon *icon_onecanvas; - char *buffer; + if (icon) { + libr_icon *icon_onecanvas; + char *buffer; - /* should we report the requested size for SVG? */ - icon->icon_size = iconsize; + /* should we report the requested size for SVG? */ + icon->icon_size = iconsize; - /* if the SVG is a "one canvas" document then extract the correctly sized icon */ - if((buffer = onecanvas_geticon_bysize(icon->buffer, iconsize)) != NULL) - { - libr_icon_close(icon); - icon_onecanvas = new_icon_handle(LIBR_SVG, iconsize, buffer, strlen(buffer)); - return icon_onecanvas; + /* if the SVG is a "one canvas" document then extract the correctly sized icon */ + if((buffer = onecanvas_geticon_bysize(icon->buffer, iconsize)) != NULL) + { + libr_icon_close(icon); + icon_onecanvas = new_icon_handle(LIBR_SVG, iconsize, buffer, strlen(buffer)); + return icon_onecanvas; + } } return icon; }