diff --git a/libvips/iofuncs/window.c b/libvips/iofuncs/window.c index 7a243163..3721c5d2 100644 --- a/libvips/iofuncs/window.c +++ b/libvips/iofuncs/window.c @@ -237,6 +237,9 @@ vips_window_set( VipsWindow *window, int top, int height ) return( -1 ); } + if( vips_window_unmap( window ) ) + return( -1 ); + if( !(baseaddr = vips__mmap( window->im->fd, 0, pagelength, pagestart )) ) return( -1 );