Revision: 48469
          http://brlcad.svn.sourceforge.net/brlcad/?rev=48469&view=rev
Author:   starseeker
Date:     2012-01-12 01:03:16 +0000 (Thu, 12 Jan 2012)
Log Message:
-----------
only try things with fp if it's not NULL - CID 317

Modified Paths:
--------------
    brlcad/trunk/src/remrt/remrt.c

Modified: brlcad/trunk/src/remrt/remrt.c
===================================================================
--- brlcad/trunk/src/remrt/remrt.c      2012-01-12 00:59:08 UTC (rev 48468)
+++ brlcad/trunk/src/remrt/remrt.c      2012-01-12 01:03:16 UTC (rev 48469)
@@ -1554,13 +1554,14 @@
     } else {
        FILE *fp;
        if ( (fp = fopen( fr->fr_filename, "r" )) == NULL )  {
+         perror( fr->fr_filename );
+       } else {
+         /* Write-protect file, to prevent re-computation */
+         if ( fchmod( fileno(fp), 0444 ) < 0 ) {
            perror( fr->fr_filename );
+         }
+         (void)fclose(fp);
        }
-       /* Write-protect file, to prevent re-computation */
-       if ( fchmod( fileno(fp), 0444 ) < 0 ) {
-           perror( fr->fr_filename );
-       }
-       (void)fclose(fp);
     }
 
     /* Forget all about this frame */

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
RSA(R) Conference 2012
Mar 27 - Feb 2
Save $400 by Jan. 27
Register now!
http://p.sf.net/sfu/rsa-sfdev2dev2
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to