Skip to content

Commit

Permalink
config: set default value to a string only if we have a string widget…
Browse files Browse the repository at this point in the history
… (AFL)
  • Loading branch information
msmeissn committed Oct 1, 2024
1 parent c760c46 commit c07a7c1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion camlibs/ptp2/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -11951,7 +11951,9 @@ _get_config (Camera *camera, const char *confname, CameraWidget **outwidget, Cam
X(PTP_DTC_UINT64,u64,"%ld")
#undef X
case PTP_DTC_STR:
gp_widget_set_value (widget, dpd.CurrentValue.str);
/* only set string if we have a string based widget */
if ((type == GP_WIDGET_TEXT) || (type == GP_WIDGET_MENU) || (type == GP_WIDGET_RADIO))
gp_widget_set_value (widget, dpd.CurrentValue.str);
break;
default:
break;
Expand Down

0 comments on commit c07a7c1

Please sign in to comment.