> >+ if (shape == NULL) > >+ return B_NO_MEMORY; > > shape->SetName(glyphName.String()); > >- if (!shape || !icon->Shapes()->AddShape(shape)) { > >+ if (!icon->Shapes()->AddShape(shape)) { > > delete shape; > > return B_NO_MEMORY; > > } > > The simpler fix would have been to move the SetName() line below the > existing checks. :-) I was not sure it would get added to the icon with the new name and too lazy to check. -- Adrien.