Don't dereference NULL pointers in sysinfo and cpuclock.
This fixes @CID1379941 and @CID1379947
This commit is contained in:
parent
1d72713dc0
commit
4a22d2f178
|
@ -853,7 +853,8 @@ _cpuclock_cb_frequency_check_notify(void *data,
|
|||
Eina_Bool init_set = EINA_FALSE;
|
||||
Thread_Config *thc = data;
|
||||
|
||||
if (!thc->inst && !thc->inst->cfg) return;
|
||||
if (!thc->inst) return;
|
||||
if (!thc->inst->cfg) return;
|
||||
if (thc->inst->cfg->esm != E_SYSINFO_MODULE_CPUCLOCK && thc->inst->cfg->esm != E_SYSINFO_MODULE_SYSINFO) return;
|
||||
|
||||
if ((thc->inst->cfg->cpuclock.status) && (status) &&
|
||||
|
|
|
@ -7,6 +7,7 @@ _sysinfo_removed_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_data)
|
|||
{
|
||||
Instance *inst = data;
|
||||
|
||||
if (!inst) return;
|
||||
if (inst->o_main != event_data) return;
|
||||
sysinfo_batman_remove(inst, NULL, NULL, NULL);
|
||||
sysinfo_thermal_remove(inst, NULL, NULL, NULL);
|
||||
|
@ -17,7 +18,7 @@ _sysinfo_removed_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_data)
|
|||
|
||||
evas_object_smart_callback_del_full(e_gadget_site_get(obj), "gadget_removed", _sysinfo_removed_cb, inst);
|
||||
evas_object_event_callback_del_full(inst->o_main, EVAS_CALLBACK_DEL, _sysinfo_deleted_cb, data);
|
||||
if (inst && inst->cfg)
|
||||
if (inst->cfg)
|
||||
{
|
||||
sysinfo_config->items = eina_list_remove(sysinfo_config->items, inst->cfg);
|
||||
if (inst->cfg->id >= 0)
|
||||
|
|
Loading…
Reference in New Issue