summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/plugins/viewer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/plugins/viewer.c b/apps/plugins/viewer.c
index 5891ca9736..d81cc094e5 100644
--- a/apps/plugins/viewer.c
+++ b/apps/plugins/viewer.c
@@ -1086,7 +1086,7 @@ static void viewer_load_settings(void) /* same name as global, but not the same
/* read settings file */
settings_fd=rb->open(SETTINGS_FILE, O_RDONLY);
- if (settings_fd && (rb->filesize(settings_fd) == sizeof(struct preferences)))
+ if ((settings_fd >= 0) && (rb->filesize(settings_fd) == sizeof(struct preferences)))
{
rb->read(settings_fd, &prefs, sizeof(struct preferences));
rb->close(settings_fd);