Index: trunk/psLib/src/fits/psFitsTable.c
===================================================================
--- trunk/psLib/src/fits/psFitsTable.c	(revision 28509)
+++ trunk/psLib/src/fits/psFitsTable.c	(revision 28510)
@@ -69,10 +69,10 @@
     if (hdutype == IMAGE_HDU) {
         // It could be an empty table
-        long size = 0;                  // Size of 'table'
-        if (fits_get_num_rows(fits->fd, &size, &status)) {
-            psFitsError(status, true, "Unable to determine size of table.");
+        int naxis = 0;                  // Dimensions of image
+        if (fits_get_img_dim(fits->fd, &naxis, &status) != 0) {
+            psFitsError(status, true, "Unable to determine dimension for table.");
             return false;
         }
-        if (size != 0) {
+        if (naxis != 0) {
             psFitsError(PS_ERR_BAD_FITS, true, "Current FITS HDU is not a table.");
             return false;
