Author: post
Date: 2010-09-12 18:42:21 +0200 (Sun, 12 Sep 2010)
New Revision: 3527
Modified:
trunk/src/rs-tethered-shooting.c
Log:
Fomatting - add NULL check.
Modified: trunk/src/rs-tethered-shooting.c
===================================================================
--- trunk/src/rs-tethered-shooting.c 2010-09-12 14:14:15 UTC (rev 3526)
+++ trunk/src/rs-tethered-shooting.c 2010-09-12 16:42:21 UTC (rev 3527)
@@ -264,6 +264,9 @@
{
int retval;
+ if (!t->camera)
+ return -1;
+
append_status(t, "Enabling capture mode\n");
printf("Get root config.\n");
@@ -347,21 +350,16 @@
/* Then associate the camera with the specified port */
p = gp_port_info_list_lookup_path (portinfolist, port);
+ switch (p)
+ {
+ case GP_ERROR_UNKNOWN_PORT:
+ append_status (t, "The port you specified ('%s') can
not be found.", port);
+ break;
+ default:
+ break;
+ }
+
CHECKRETVAL(ret);
- switch (p) {
- case GP_ERROR_UNKNOWN_PORT:
- append_status (t, "The port you specified "
- "('%s') can not be found. Please "
- "specify one of the ports found by "
- "'gphoto2 --list-ports' and make "
- "sure the spelling is correct "
- "(i.e. with prefix 'serial:' or 'usb:').",
- port);
- break;
- default:
- break;
- }
- CHECKRETVAL(ret);
ret = gp_port_info_list_get_info (portinfolist, p, &pi);
CHECKRETVAL(ret);
ret = gp_camera_set_port_info (*camera, pi);
_______________________________________________
Rawstudio-commit mailing list
[email protected]
http://rawstudio.org/cgi-bin/mailman/listinfo/rawstudio-commit