(while sensors memory structures are unallocated the update measures thread was still running)
/* main loop */
gtk_main();
/* main loop */
gtk_main();
+ g_mutex_lock(ui.sensors_mutex);
- psensor_list_free(ui.sensors);
#ifdef HAVE_NVIDIA
nvidia_cleanup();
#ifdef HAVE_NVIDIA
nvidia_cleanup();
#ifdef HAVE_LIBATIADL
amd_cleanup();
#endif
#ifdef HAVE_LIBATIADL
amd_cleanup();
#endif
+
+ psensor_list_free(ui.sensors);
+ ui.sensors = NULL;
+
+ g_mutex_unlock(ui.sensors_mutex);
+