diff --git a/retroshare-gui/src/gui/notifyqt.cpp b/retroshare-gui/src/gui/notifyqt.cpp index 5edec87a3..dd41a5791 100644 --- a/retroshare-gui/src/gui/notifyqt.cpp +++ b/retroshare-gui/src/gui/notifyqt.cpp @@ -422,21 +422,19 @@ void NotifyQt::UpdateGUI() { OnlineToaster * onlineToaster = new OnlineToaster(); onlineToaster->setMessage(QString::fromStdString(realmsg)); - - if(size != 0) - { - // set the image - QPixmap pix ; - pix.loadFromData(data,size,"PNG") ; - onlineToaster->setPixmap(pix); - delete[] data ; - } - else - { - onlineToaster->setPixmap(QPixmap(":/images/user/personal64.png")); - } - + if(size != 0) + { + // set the image + QPixmap pix ; + pix.loadFromData(data,size,"PNG") ; + onlineToaster->setPixmap(pix); + } + else + { + onlineToaster->setPixmap(QPixmap(":/images/user/personal64.png")); + } + onlineToaster->show(); onlineToaster->play(); } @@ -449,6 +447,10 @@ void NotifyQt::UpdateGUI() } break; } + + if (data) { + delete[] data; + } } if (rsNotify->NotifySysMessage(sysid, type, title, msg))