[PATCH] Fix another setup.exe crash.
Corinna Vinschen
corinna-cygwin@cygwin.com
Mon Nov 30 10:00:00 GMT 2009
On Nov 27 19:45, Dave Korn wrote:
> The attached patch resolves this by noticing if the std::map::find() method
> call returns the not-found result, and supplying a static dummy empty "All"
> Category object to the PickView constructor instead. This results in a
> chooser page with a single category heading, "None found", and nothing in the
> category. That's nicer than a crash.
>
> It might be better to detect the coincidence of conditions 1) and 2) above
> and just tell the user they've done something wrong, but it would be more
> complex because the information isn't conveniently available in one place at
> one time, so I figured this was a reasonable fix instead, but maybe we should
> bikeshed the best wording for the empty category header a bit - perhaps it
> should say something like "No packages found in chosen package directory"?
"No packages found" should be sufficient, shouldn't it?
> setup/ChangeLog:
>
> * choose.cc (empty_cat): New variable.
> (dummy_cat): Likewise.
> (ChooserPage::createListview): Use them to construct PickView when
> nothing is found in the "All" category.
>
> OK?
Sure, go ahead.
Thanks,
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader cygwin AT cygwin DOT com
Red Hat
More information about the Cygwin-apps
mailing list