Fix for empty SVG

Stephen Paul Weber created

Change summary

src/main/java/eu/siacs/conversations/persistance/FileBackend.java | 6 
1 file changed, 4 insertions(+), 2 deletions(-)

Detailed changes

src/main/java/eu/siacs/conversations/persistance/FileBackend.java 🔗

@@ -2159,7 +2159,8 @@ public class FileBackend {
             svg.renderToCanvas(canvas, target);
 
             return new SVGDrawable(output);
-        } catch (final IOException | SVGParseException e) {
+        } catch (final IOException | SVGParseException | IllegalArgumentException e) {
+            Log.w(Config.LOGTAG, "Could not parse SVG: " + e);
             return null;
         }
     }
@@ -2180,7 +2181,8 @@ public class FileBackend {
             svg.renderToCanvas(canvas);
 
             return new SVGDrawable(output);
-        } catch (final IOException | SVGParseException e) {
+        } catch (final IOException | SVGParseException | IllegalArgumentException e) {
+            Log.w(Config.LOGTAG, "Could not parse SVG: " + e);
             return null;
         }
     }