Skip to content

Commit

Permalink
fixed segfault in osd called from img-view
Browse files Browse the repository at this point in the history
  • Loading branch information
nadvornik committed Mar 15, 2009
1 parent a83ce81 commit 5f2862f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/image-overlay.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,25 +147,25 @@ void image_osd_histogram_log_toggle(ImageWindow *imd)

void image_osd_toggle(ImageWindow *imd)
{
OverlayStateData *osd;
OsdShowFlags show;

if (!imd) return;

osd = image_get_osd_data(imd);
if (osd->show == OSD_SHOW_NOTHING)
show = image_osd_get(imd);
if (show == OSD_SHOW_NOTHING)
{
image_osd_set(imd, OSD_SHOW_INFO | OSD_SHOW_STATUS);
return;
}
else
{
if (osd->show & OSD_SHOW_HISTOGRAM)
if (show & OSD_SHOW_HISTOGRAM)
{
image_osd_set(imd, OSD_SHOW_NOTHING);
}
else
{
image_osd_set(imd, osd->show | OSD_SHOW_HISTOGRAM);
image_osd_set(imd, show | OSD_SHOW_HISTOGRAM);
}
}
}
Expand Down

0 comments on commit 5f2862f

Please sign in to comment.