diff --git a/app/pdb/convert-cmds.c b/app/pdb/convert-cmds.c index 9d3b8a4d7b..7702af60d2 100644 --- a/app/pdb/convert-cmds.c +++ b/app/pdb/convert-cmds.c @@ -197,7 +197,7 @@ image_convert_set_dither_matrix_invoker (GimpProcedure *procedure, if (success) { - if (matrix_length == width * height) + if (width == 0 || height == 0 || matrix_length == width * height) { gimp_image_convert_set_dither_matrix (matrix, width, height); } diff --git a/tools/pdbgen/pdb/convert.pdb b/tools/pdbgen/pdb/convert.pdb index 94901174ed..1368414334 100644 --- a/tools/pdbgen/pdb/convert.pdb +++ b/tools/pdbgen/pdb/convert.pdb @@ -201,7 +201,7 @@ HELP %invoke = ( code => <<'CODE' { - if (matrix_length == width * height) + if (width == 0 || height == 0 || matrix_length == width * height) { gimp_image_convert_set_dither_matrix (matrix, width, height); }