Menu

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

5.1
open
nobody
1
2015-01-28
2013-07-18
secretmojo
No

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.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB