summaryrefslogtreecommitdiffstats
path: root/card.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'card.cpp')
-rw-r--r--card.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/card.cpp b/card.cpp
index 0f4fc3f..ffcffbd 100644
--- a/card.cpp
+++ b/card.cpp
@@ -101,6 +101,12 @@ enum Suit Card::getSuit(void)
void Card::sortCards(Card **cards)
{
+ if (cards == NULL)
+ {
+ PRINT_COLOR(ANSI_COLOR_RED, "\nsortCards(): cards parameter is NULL!\n");
+ return;
+ }
+
/* reverse bubble sort */
int i, j;
Card *tmp;