Fix a crash (#3011)

This commit is contained in:
Zach H 2018-01-18 11:53:57 -05:00 committed by GitHub
parent 7a150c558d
commit dcc632e0d4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 46 additions and 28 deletions

View file

@ -20,10 +20,16 @@ CardInfoPicture::CardInfoPicture(QWidget *parent)
void CardInfoPicture::setCard(CardInfo *card)
{
if (info)
{
disconnect(info, nullptr, this, nullptr);
}
info = card;
if(info)
if (info)
{
connect(info, SIGNAL(pixmapUpdated()), this, SLOT(updatePixmap()));
}
updatePixmap();
}