Bug fix: Seg. fault when OSD font not set
authorColin Clark <colin.clark@cclark.uk>
Sun, 25 Jun 2023 09:21:10 +0000 (10:21 +0100)
committerColin Clark <colin.clark@cclark.uk>
Sun, 25 Jun 2023 09:21:10 +0000 (10:21 +0100)
If Geeqie is started with no geeqierc.xml file and OSD is selected,
there will be a seg.fault.

Set the OSD font in default options - the font set does not seem to
matter.

src/options.cc

index 4df093f..a0efc34 100644 (file)
@@ -125,7 +125,7 @@ ConfOptions *init_options(ConfOptions *options)
        options->image_overlay.template_string = nullptr;
        options->image_overlay.x = 10;
        options->image_overlay.y = -10;
-       options->image_overlay.font = nullptr;
+       options->image_overlay.font = g_strdup("Sans 10");
        options->image_overlay.text_red = 0;
        options->image_overlay.text_green = 0;
        options->image_overlay.text_blue = 0;