Only remove source if exists

This commit is contained in:
Dave Davenport 2016-01-27 23:49:56 +01:00
parent 91780b71db
commit a8a8ba8cd2
1 changed files with 3 additions and 1 deletions

View File

@ -2012,7 +2012,9 @@ static void cleanup ()
tpool = NULL;
}
if ( main_loop != NULL ) {
g_source_destroy ( main_loop_source );
if( main_loop_source) {
g_source_destroy ( main_loop_source );
}
g_main_loop_unref ( main_loop );
main_loop = NULL;
}