[gnome-packagekit] Fix a segfault when there is a distribution upgrade available
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-packagekit] Fix a segfault when there is a distribution upgrade available
- Date: Tue, 9 Oct 2012 12:16:09 +0000 (UTC)
commit a547582193fcee431786a73c3967411b98fd9bde
Author: Richard Hughes <richard hughsie com>
Date: Fri Oct 5 22:38:35 2012 +0100
Fix a segfault when there is a distribution upgrade available
Resolves: https://bugzilla.gnome.org/show_bug.cgi?id=685579
src/gpk-update-viewer.c | 18 ++++++++++--------
1 files changed, 10 insertions(+), 8 deletions(-)
---
diff --git a/src/gpk-update-viewer.c b/src/gpk-update-viewer.c
index 04ba4ee..142bf5b 100644
--- a/src/gpk-update-viewer.c
+++ b/src/gpk-update-viewer.c
@@ -1459,14 +1459,16 @@ gpk_update_viewer_reconsider_info (void)
gtk_button_set_label (GTK_BUTTON (widget), title);
/* no updates */
- len = update_array->len;
- if (len == 0) {
- gpk_update_viewer_modal_error_with_timeout (
- /* TRANSLATORS: title: nothing to do */
- _("All software is up to date"),
- /* TRANSLATORS: tell the user the problem */
- _("There are no software updates available for your computer at this time."));
- goto out;
+ if (update_array != NULL) {
+ len = update_array->len;
+ if (len == 0) {
+ gpk_update_viewer_modal_error_with_timeout (
+ /* TRANSLATORS: title: nothing to do */
+ _("All software is up to date"),
+ /* TRANSLATORS: tell the user the problem */
+ _("There are no software updates available for your computer at this time."));
+ goto out;
+ }
}
/* use correct status pane */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]