Commit 4412063c authored by Martin Flöser's avatar Martin Flöser
Browse files

[sever] Check whether it's a shmBuffer in BufferInterface::Private::format

Safety check before calling into wayland library.
parent b47c6566
......@@ -191,6 +191,9 @@ void BufferInterface::unref()
QImage::Format BufferInterface::Private::format() const
{
if (!shmBuffer) {
return QImage::Format_Invalid;
}
switch (wl_shm_buffer_get_format(shmBuffer)) {
case WL_SHM_FORMAT_ARGB8888:
return QImage::Format_ARGB32;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment