Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Donald Haase
Cockatrice
Commits
ac16602f
Commit
ac16602f
authored
Sep 22, 2015
by
Fabio Bas
Browse files
Fix crash on null pointer dereference
parent
f6c7f335
Changes
1
Hide whitespace changes
Inline
Side-by-side
cockatrice/src/carditem.cpp
View file @
ac16602f
...
...
@@ -107,7 +107,8 @@ void CardItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
painter
->
save
();
transformPainter
(
painter
,
translatedSize
,
tapAngle
);
QStringList
ptDbSplit
=
db
->
getCard
(
name
)
->
getPowTough
().
split
(
"/"
);
CardInfo
*
card
=
db
->
getCard
(
name
);
QStringList
ptDbSplit
=
card
?
card
->
getPowTough
().
split
(
"/"
)
:
QStringList
();
QStringList
ptSplit
=
pt
.
split
(
"/"
);
if
(
getFaceDown
()
||
ptDbSplit
.
at
(
0
)
!=
ptSplit
.
at
(
0
)
||
ptDbSplit
.
at
(
1
)
!=
ptSplit
.
at
(
1
))
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment