From ceb6fc010ee9f4fadbcbf3e3cdc481ec505cdc32 Mon Sep 17 00:00:00 2001 From: michael Date: Sat, 20 Jan 2007 06:37:35 +0000 Subject: dynamic properties for bars; new 'property_valid()' helper git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@749 3ae390bd-cb1e-0410-b409-cd5a39f66f1f --- widget_image.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'widget_image.c') diff --git a/widget_image.c b/widget_image.c index 15ca90b..6320e44 100644 --- a/widget_image.c +++ b/widget_image.c @@ -230,6 +230,11 @@ int widget_image_init(WIDGET * Self) property_load(section, "visible", "1", &Image->visible); property_load(section, "inverted", "0", &Image->inverted); + /* sanity checks */ + if (!property_valid(&Image->file)) { + error("Warning: widget %s has no file", section); + } + free(section); Self->data = Image; -- cgit v1.2.3