diff --git a/lib/modules/_Image_XCF.pmod b/lib/modules/_Image_XCF.pmod index 38f9bcdad27e4a51a929edf60179afb642d26dc4..95452c1b070115724868f4c570a60d3ba8cce99c 100644 --- a/lib/modules/_Image_XCF.pmod +++ b/lib/modules/_Image_XCF.pmod @@ -285,12 +285,15 @@ class GimpImage int last_selected_row; int num_paths; array res = ({}); - sscanf( data, "%4c%4c%s", last_selected_row, num_paths, data ); - while(num_paths--) + if( stringp( data ) ) { - Path path = Path(); - data = decode_one_path( data, path ); - res += ({ path }); + sscanf( data, "%4c%4c%s", last_selected_row, num_paths, data ); + while(num_paths--) + { + Path path = Path(); + data = decode_one_path( data, path ); + res += ({ path }); + } } return res; } @@ -330,7 +333,7 @@ class GimpImage res_unit = p->data->get_int( 0 ); break; case PROP_PATHS: - paths = decode_paths( p->data ); + paths = decode_paths( (string)p->data ); break; case PROP_USER_UNIT: /* NYI */