client/Wayland/wlf_cliprdr.c: resolve possible null pointer dereference
found by cppcheck [client/Wayland/wlf_cliprdr.c:143] -> [client/Wayland/wlf_cliprdr.c:158]: (warning) Either the condition 'clipboard' is redundant or there is possible null pointer dereference: clipboard. [client/Wayland/wlf_cliprdr.c:163] -> [client/Wayland/wlf_cliprdr.c:178]: (warning) Either the condition 'clipboard' is redundant or there is possible null pointer dereference: clipboard.
This commit is contained in:
parent
85161c718f
commit
d1939cfc4f
@ -155,6 +155,7 @@ static void wlf_cliprdr_free_server_formats(wfClipboard* clipboard)
|
||||
clipboard->numServerFormats = 0;
|
||||
}
|
||||
|
||||
if (clipboard)
|
||||
UwacClipboardOfferDestroy(clipboard->seat);
|
||||
}
|
||||
|
||||
@ -175,6 +176,7 @@ static void wlf_cliprdr_free_client_formats(wfClipboard* clipboard)
|
||||
clipboard->numClientFormats = 0;
|
||||
}
|
||||
|
||||
if (clipboard)
|
||||
UwacClipboardOfferDestroy(clipboard->seat);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user