fix crash when registry file is not opened
This commit is contained in:
parent
ef9788a0a1
commit
5f7b50f902
@ -86,6 +86,11 @@ void registry_print(rdpRegistry* registry, FILE* fp)
|
||||
void registry_create(rdpRegistry* registry)
|
||||
{
|
||||
registry->fp = fopen(registry->file, "w+");
|
||||
if (registry->fp == NULL)
|
||||
{
|
||||
printf("registry_create: error opening [%s] for writing\n", registry->file);
|
||||
return;
|
||||
}
|
||||
registry_print(registry, registry->fp);
|
||||
fflush(registry->fp);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user