Skip to content

Commit

Permalink
config: do not crash if we do not have an EOS imageformat in the list
Browse files Browse the repository at this point in the history
seen with Canon EOS M10
  • Loading branch information
msmeissn committed Nov 21, 2024
1 parent 52ab5ba commit d2d9dbe
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion camlibs/ptp2/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -12321,7 +12321,10 @@ camera_lookup_by_property(Camera *camera, PTPDevicePropDesc *dpd, char **name, c
case GP_WIDGET_TEXT: {
char *val;
CR (gp_widget_get_value (widget, &val));
C_MEM (*content = strdup(val));
if (val != NULL)
C_MEM (*content = strdup(val));
else
C_MEM (*content = strdup("<null>"));
break;
}
case GP_WIDGET_RANGE: {
Expand Down

0 comments on commit d2d9dbe

Please sign in to comment.