Skip to content

Commit

Permalink
PkControl: Fix crash with 'get-time' transaction
Browse files Browse the repository at this point in the history
Fixes the following crash:

$ pkcon get-time get-updates
(pkcon:28486): PackageKit-CRITICAL **: 20:31:50.933: pk_control_get_time_since_action_finish: assertion 'g_async_result_is_tagged (res, pk_control_get_transaction_list_async)' failed
Segmentation fault

With fix:

$ pkcon get-time get-updates
Time since: 165s
  • Loading branch information
sidt4 committed Jun 5, 2024
1 parent 739e75e commit 537707c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/packagekit-glib2/pk-control.c
Original file line number Diff line number Diff line change
Expand Up @@ -1384,7 +1384,7 @@ pk_control_get_time_since_action_finish (PkControl *control,
{
g_return_val_if_fail (PK_IS_CONTROL (control), 0);
g_return_val_if_fail (g_task_is_valid (res, control), 0);
g_return_val_if_fail (g_async_result_is_tagged (res, pk_control_get_transaction_list_async), 0);
g_return_val_if_fail (g_async_result_is_tagged (res, pk_control_get_time_since_action_async), 0);
g_return_val_if_fail (error == NULL || *error == NULL, 0);

return GPOINTER_TO_UINT(g_task_propagate_pointer (G_TASK (res), error));
Expand Down

0 comments on commit 537707c

Please sign in to comment.