[AD] [alleg:bugs] #389 passing NULL title in display_native_dialog() causes NSException (5.0.10) [OSX]

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]



[bugs:#389] passing NULL title in display_native_dialog() causes NSException (5.0.10) [OSX]

Status: open
Labels: crash dialog OSX
Created: Thu Jul 18, 2013 10:11 PM UTC by secretmojo
Last Updated: Thu Jul 18, 2013 10:11 PM UTC
Owner: nobody

The following causes an NSException on OSX:

    al_show_native_message_box(NULL, NULL, NULL, 
                "Everything's working!", NULL, NULL);

The following, however, succeeds:

    al_show_native_message_box(NULL, "Working!", NULL, 
                "Everything's working!", NULL, NULL);

So I changed addons/native_dialog/dialog.c to provide an empty string on NULL:

   if (title != NULL)
    fc->title = al_ustr_new(title);
   else
    fc->title = al_ustr_new("");

   fc->mb_heading = al_ustr_new(heading);

This fixed the problem.


Sent from sourceforge.net because alleg-developers@xxxxxxxxxx is subscribed to https://sourceforge.net/p/alleg/bugs/

To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/alleg/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/