Code review comment for lp://qastaging/~azzar1/unity/launcher-devices-improvement

Revision history for this message
Andrea Azzarone (azzar1) wrote :

@Tim I think that in glib::String::Str() there is a little problem:

=================================================================
std::string String::Str() const
{
  return std::string(string_);
}
=================================================================

In fact if string_ is NULL an exception is thrown (at least this happens on
my computer). I noticed this because this branch crash if we have
a gvolume without uuid (e.g. a cd-rom). This fix works good but i don't know
if this is the better way to fix:

=================================================================
std::string String::Str() const
{
  if (string_)
    return std::string(string_);
  else
    return std::string("");
}
=================================================================

You are the expert, so let me know if this is a good fix :)

« Back to merge proposal