Merge pull request #5236 from chipitsine/master

client/Wayland/wlf_cliprdr.c: resolve possible null pointer dereference
This commit is contained in:
akallabeth 2019-02-01 08:37:24 +01:00 committed by GitHub
commit 2693389a10
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -155,7 +155,8 @@ static void wlf_cliprdr_free_server_formats(wfClipboard* clipboard)
clipboard->numServerFormats = 0;
}
UwacClipboardOfferDestroy(clipboard->seat);
if (clipboard)
UwacClipboardOfferDestroy(clipboard->seat);
}
static void wlf_cliprdr_free_client_formats(wfClipboard* clipboard)
@ -175,7 +176,8 @@ static void wlf_cliprdr_free_client_formats(wfClipboard* clipboard)
clipboard->numClientFormats = 0;
}
UwacClipboardOfferDestroy(clipboard->seat);
if (clipboard)
UwacClipboardOfferDestroy(clipboard->seat);
}
/**