[gnome-packagekit/gnome-3-4] 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/gnome-3-4] Fix a segfault when there is a distribution upgrade available
- Date: Fri, 5 Oct 2012 21:37:26 +0000 (UTC)
commit 6589bc3f0bb0d690649dd47bc43781fee1577731
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 024a781..daafbe0 100644
--- a/src/gpk-update-viewer.c
+++ b/src/gpk-update-viewer.c
@@ -1463,14 +1463,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]