Skip to content

Commit 81a4849

Browse files
committed
fix load cancel
see #58 thanks @keyboqrd
1 parent 1ce2787 commit 81a4849

File tree

4 files changed

+15
-2
lines changed

4 files changed

+15
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
master
22

3+
## 4.1.3 24/09/25
4+
5+
- fix load cancel [keyboqrd]
6+
37
## 4.1.2 02/08/25
48

59
- add an icon to the exe on windows

meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
project('vipsdisp', 'c',
2-
version: '4.1.2',
2+
version: '4.1.3',
33
license: 'MIT',
44
meson_version: '>=0.56',
55
default_options: [

src/imagewindow.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -853,7 +853,7 @@ imagewindow_cancel_clicked(GtkWidget *button, Imagewindow *win)
853853
VipsImage *image;
854854

855855
if ((tilesource = imagewindow_get_tilesource(win)) &&
856-
(image = tilesource_get_image(tilesource)))
856+
(image = tilesource_get_base_image(tilesource)))
857857
vips_image_set_kill(image, TRUE);
858858
}
859859

src/tilesource.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1930,6 +1930,15 @@ tilesource_request_tile(Tilesource *tilesource, Tile *tile)
19301930
tile->region->valid.left, tile->region->valid.top);
19311931
#endif /*DEBUG_VERBOSE*/
19321932

1933+
/* Load was cancelled, perhaps.
1934+
*/
1935+
if (tilesource->load_error) {
1936+
vips_error("Fetch tile", _("Unable to load image\n%s"),
1937+
tilesource->load_message);
1938+
1939+
return -1;
1940+
}
1941+
19331942
/* Change z if necessary.
19341943
*/
19351944
if (tilesource->current_z != tile->z ||

0 commit comments

Comments
 (0)