Avoid trying to convert a null surface

This commit is contained in:
Martín Capello 2024-10-09 15:47:30 -03:00
parent b1d1265450
commit 94202a51c8

View File

@ -96,7 +96,8 @@ namespace app {
m_image = image;
}
DraggedData(const os::SurfaceRef& surface) {
convert_surface_to_image(surface.get(), 0, 0, surface->width(), surface->height(), m_image);
if (surface)
convert_surface_to_image(surface.get(), 0, 0, surface->width(), surface->height(), m_image);
}
const doc::ImageRef& getImage() const { return m_image; }