summaryrefslogtreecommitdiff
path: root/src/eom-statusbar.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/eom-statusbar.c')
-rw-r--r--src/eom-statusbar.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/eom-statusbar.c b/src/eom-statusbar.c
index c791701..b4d6f08 100644
--- a/src/eom-statusbar.c
+++ b/src/eom-statusbar.c
@@ -116,6 +116,10 @@ eom_statusbar_set_image_number (EomStatusbar *statusbar,
gtk_statusbar_pop (GTK_STATUSBAR (statusbar->priv->img_num_statusbar), 0);
+ /* Hide number display if values don't make sense */
+ if (G_UNLIKELY (num <= 0 || tot <= 0))
+ return;
+
/* Translators: This string is displayed in the statusbar.
* The first token is the image number, the second is total image
* count.
@@ -160,4 +164,4 @@ eom_statusbar_set_has_resize_grip (EomStatusbar *statusbar, gboolean has_resize_
gtk_statusbar_set_has_resize_grip (GTK_STATUSBAR (statusbar),
has_resize_grip);
}
-#endif \ No newline at end of file
+#endif