Skip to content

Commit

Permalink
some fixes for null-pointers on icons
Browse files Browse the repository at this point in the history
  • Loading branch information
wadealer committed Aug 1, 2013
1 parent 47ba447 commit b5d034e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/psipopup.cpp
Expand Up @@ -132,7 +132,7 @@ void PsiPopup::Private::init(const PsiIcon *_titleIcon, const QString& titleText

if ( doAlertIcon )
titleIcon = new AlertIcon(_titleIcon);
else
else if(_titleIcon)
titleIcon = new PsiIcon(*_titleIcon);

FancyPopup::setHideTimeout(psiPopup->duration());
Expand Down
14 changes: 10 additions & 4 deletions src/widgets/fancylabel.cpp
Expand Up @@ -79,10 +79,16 @@ class IconLabel::Private : public QObject
copyIcon = _copyIcon;

#ifndef WIDGET_PLUGIN
if ( i && copyIcon )
icon = new PsiIcon(*i);
else
icon = (PsiIcon *)i;
if ( i ) {
if (copyIcon)
icon = new PsiIcon(*i);
else
icon = (PsiIcon *)i;
}
else {
icon = 0;
}

#else
Q_UNUSED(i);
#endif
Expand Down

0 comments on commit b5d034e

Please sign in to comment.