summaryrefslogtreecommitdiff
path: root/plugins/Toaster/src/images.h
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Toaster/src/images.h')
-rw-r--r--plugins/Toaster/src/images.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/plugins/Toaster/src/images.h b/plugins/Toaster/src/images.h
index cc22359bc9..19d7fddc87 100644
--- a/plugins/Toaster/src/images.h
+++ b/plugins/Toaster/src/images.h
@@ -50,7 +50,14 @@ public:
isi.hbm = _hBitmap;
isi.dwMask = IMGI_HBITMAP;
isi.fif = FREE_IMAGE_FORMAT::FIF_PNG;
- CallService(MS_IMG_SAVE, (WPARAM)&isi, IMGL_WCHAR);
+ try
+ {
+ CallService(MS_IMG_SAVE, (WPARAM)&isi, IMGL_WCHAR);
+ }
+ catch (...)
+ {
+ return nullptr;
+ }
}
return mir_wstrdup(wszSavePath);
}