Why do i get the crash indicated in the code below?
#define __USE_INLINE__ #include <exec/types.h> #include <proto/exec.h> #include <proto/dos.h> #include <proto/intuition.h> int main (void) { struct ColorSpec *g_prefs = NULL; /// test PutStr("Working\n"); if (!(g_prefs = (struct ColorSpec *)AllocVecTags(sizeof(struct ColorSpec),AVT_ClearWithValue, 0, TAG_DONE))) { PutStr("No Prefs obtained\n"); goto endprog; } PutStr("Gui.c Freeing prefs\n"); if (g_prefs) FreeVec(&g_prefs); ///+++ PutStr("Gui.c Freed prefs\n"); /// crash endprog: return 1; }