src/init.c: bail out if skin_name or font_name is "".
Fixes a crash on AROS src/filesel.c: fixed BSTR conversion routine for AROS. Without this fix "RAM DISK" was printed as "AM DISK" in the file selector. src/setup.c: removed slash to avoid that paths like "PROGDIR:/share" are created on AROS. That fix should be right for all Amiga like OS but I don't want to change things which I can't test. git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1970 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
12
src/init.c
12
src/init.c
@@ -664,6 +664,12 @@ T_Gui_skin * Load_graphics(const char * skin_file, T_Gradient_array *gradients)
|
||||
char filename[MAX_PATH_CHARACTERS];
|
||||
SDL_Surface * gui;
|
||||
|
||||
if (skin_file[0] == '\0')
|
||||
{
|
||||
sprintf(Gui_loading_error_message, "Wrong skin file name \"\"\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
gfx = (T_Gui_skin *)malloc(sizeof(T_Gui_skin));
|
||||
if (gfx == NULL)
|
||||
{
|
||||
@@ -744,6 +750,12 @@ byte * Load_font(const char * font_name)
|
||||
char filename[MAX_PATH_CHARACTERS];
|
||||
SDL_Surface * image;
|
||||
|
||||
if (font_name[0] == '\0')
|
||||
{
|
||||
sprintf(Gui_loading_error_message, "Wrong font name \"\"\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
font = (byte *)malloc(8*8*256);
|
||||
if (font == NULL)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user