diff --git a/src/pxsimple.c b/src/pxsimple.c index 98cabc47..489e403a 100644 --- a/src/pxsimple.c +++ b/src/pxsimple.c @@ -265,7 +265,8 @@ void Display_line_on_screen_simple(word x_pos,word y_pos,word width,byte * line) /* On affiche toute une ligne de pixels. Utilisé pour les textes. */ { byte* dest = Get_Screen_pixel_ptr(x_pos, y_pos); - memcpy(dest, line, width); + if (dest != NULL) + memcpy(dest, line, width); } void Display_transparent_mono_line_on_screen_simple( diff --git a/src/windows.c b/src/windows.c index 43884d95..5e1f3335 100644 --- a/src/windows.c +++ b/src/windows.c @@ -1114,7 +1114,8 @@ void Print_filename(void) display_string[string_size] = 0; } // Print - Print_general_unicode(Screen_width-(string_size<<3)*Menu_factor_X,Menu_status_Y,display_string,MC_Black,MC_Light); + if (string_size > 0) + Print_general_unicode(Screen_width-(string_size<<3)*Menu_factor_X,Menu_status_Y,display_string,MC_Black,MC_Light); } // Fonction d'affichage d'une chaine numérique avec une fonte très fine