mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-15 00:44:19 +09:00
[core,utils] ignore NULL values in remove_rdpdr_type
if there are no redirected devices of given type ignore the NULL value and return success.
This commit is contained in:
@@ -333,8 +333,11 @@ static BOOL remove_rdpdr_type(rdpSettings* settings, UINT32 type)
|
||||
do
|
||||
{
|
||||
printer = freerdp_device_collection_find_type(settings, type);
|
||||
if (!freerdp_device_collection_del(settings, printer))
|
||||
rc = FALSE;
|
||||
if (printer)
|
||||
{
|
||||
if (!freerdp_device_collection_del(settings, printer))
|
||||
rc = FALSE;
|
||||
}
|
||||
freerdp_device_free(printer);
|
||||
} while (printer);
|
||||
return rc;
|
||||
|
||||
Reference in New Issue
Block a user