gio: avoid unneccessary unitialization

This commit is contained in:
Frank Morgner 2018-10-17 09:39:20 +02:00
parent 2fd8e278f5
commit 5095e29ae3
1 changed files with 4 additions and 3 deletions

View File

@ -442,9 +442,10 @@ static GApplication *application = NULL;
void sc_notify_init(void)
{
sc_notify_close();
application = g_application_new("org.opensc.notify", G_APPLICATION_NON_UNIQUE);
if (application) {
if (!application) {
application = g_application_new("org.opensc.notify", G_APPLICATION_NON_UNIQUE);
}
if (application && FALSE == g_application_get_is_registered(application)) {
g_application_register(application, NULL, NULL);
}
}