[yast-commit] r50500 - in /trunk/gtk: ChangeLog src/YGPackageSelector.cc
Author: rpmcruz Date: Sat Aug 30 02:51:02 2008 New Revision: 50500 URL: http://svn.opensuse.org/viewcvs/yast?rev=50500&view=rev Log: * src/YGPackageSelector.cc: bug fix 418781: it can happen that zypp doesn't have information on a package repository and we end up with a null pointer. This happens for the (new?) add-on tool, for the added repository. Modified: trunk/gtk/ChangeLog trunk/gtk/src/YGPackageSelector.cc Modified: trunk/gtk/ChangeLog URL: http://svn.opensuse.org/viewcvs/yast/trunk/gtk/ChangeLog?rev=50500&r1=50... ============================================================================== --- trunk/gtk/ChangeLog (original) +++ trunk/gtk/ChangeLog Sat Aug 30 02:51:02 2008 @@ -20,6 +20,10 @@ * src/YGUtils.cc: replaced the old button icon approach based on English strings by one that tests button labels to stock ones. + * src/YGPackageSelector.cc: bug fix 418781: it can happen that zypp doesn't + have information on a package repository and we end up with a null pointer. + This happens for the (new?) add-on tool, for the added repository. + 2008-08-22 Ricardo Cruz <rpmcruz@alunos.dcc.fc.up.pt> * src/yzypptags.cc: bug request 418676: use title capitalization for Modified: trunk/gtk/src/YGPackageSelector.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/YGPackageSelector.cc?rev=... ============================================================================== --- trunk/gtk/src/YGPackageSelector.cc (original) +++ trunk/gtk/src/YGPackageSelector.cc Sat Aug 30 02:51:02 2008 @@ -1717,8 +1717,13 @@ for (int i = 0; single_package->getAvailableVersion (i); i++) { const Ypp::Package::Version *version = single_package->getAvailableVersion (i); string text = version->number + " <small>(" + version->arch + ")</small>\n"; - string repo = YGUtils::truncate (version->repo->name, - MAX (20, version->number.length() + version->arch.length() + 4), 0); + string repo; + if (version->repo) + repo = YGUtils::truncate (version->repo->name, + MAX (20, version->number.length() + version->arch.length() + 4), 0); + else + yuiError() << "Repository of package '" << single_package->name() + << "' unknown\n"; text += "<small>" + repo + "</small>"; GtkTreeIter iter; gtk_list_store_append (GTK_LIST_STORE (model), &iter); -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
rpmcruz@svn.opensuse.org