diff options
author | Kyle K <kylek389@gmail.com> | 2011-01-29 19:46:29 -0600 |
---|---|---|
committer | Kamil Kaminski <kamilkss@gmail.com> | 2011-01-29 19:46:29 -0600 |
commit | da1a7180edee0f108d15314e493faa2e9e067095 (patch) | |
tree | d70fc2511861cae9588a136254d8095dedf83332 /card.cpp | |
parent | 63a098d36fcf53b2cad48d042f6efd3174d93717 (diff) | |
download | poker-da1a7180edee0f108d15314e493faa2e9e067095.tar.gz poker-da1a7180edee0f108d15314e493faa2e9e067095.tar.bz2 poker-da1a7180edee0f108d15314e493faa2e9e067095.zip |
do more error checking
Diffstat (limited to 'card.cpp')
-rw-r--r-- | card.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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; |