summaryrefslogtreecommitdiffstats
path: root/launcher/widgets/clock/simple_clock_widget.c
diff options
context:
space:
mode:
Diffstat (limited to 'launcher/widgets/clock/simple_clock_widget.c')
-rw-r--r--launcher/widgets/clock/simple_clock_widget.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/launcher/widgets/clock/simple_clock_widget.c b/launcher/widgets/clock/simple_clock_widget.c
index 83b5a713..0c89cbc2 100644
--- a/launcher/widgets/clock/simple_clock_widget.c
+++ b/launcher/widgets/clock/simple_clock_widget.c
@@ -5,7 +5,7 @@
void simple_clock_widget_setup(LauncherSettings *settings, void ** context_ptr) {
(void) settings;
// the only context we need is the timestamp of the previous tick.
- *context_ptr = malloc(sizeof(uint32_t));
+ if (*context_ptr == NULL) *context_ptr = malloc(sizeof(uint32_t));
}
void simple_clock_widget_activate(LauncherSettings *settings, void *context) {