main: fix malloc call
widgets: possible fix for segfault

Use malloc instead of calloc, ref #30
Merge branch 'fix/segfaults' into develop