Fixed bug 2560 - Crash on any input SDL-1.2
authorSam Lantinga
Sun, 22 Jun 2014 11:08:33 -0700
branchSDL-1.2
changeset 8911606600f0f6d7
parent 8716 0aade9c0203f
child 8914 3984998ee330
Fixed bug 2560 - Crash on any input

Alex Marshall

On all of my OSX machines running 10.9 (I posted OS as Mac OS X (All) due to there not being a 10.9 selection), I get a crash on any input using SDL 1.2. I've had this issue in both HG 1.2 and final release 1.2 on the website.

Today I got around to trying to fix it; commenting out the two uses of 'field_edit' in src/video/quartz/SQL_QuartzEvents.m fixes the crash and doesn't cause any side effects as far as I can tell.
src/video/quartz/SDL_QuartzEvents.m
     1.1 --- a/src/video/quartz/SDL_QuartzEvents.m	Thu Apr 17 22:36:14 2014 -0700
     1.2 +++ b/src/video/quartz/SDL_QuartzEvents.m	Sun Jun 22 11:08:33 2014 -0700
     1.3 @@ -345,11 +345,12 @@
     1.4          the scancode/keysym.
     1.5      */
     1.6      if (SDL_TranslateUNICODE && state == SDL_PRESSED) {
     1.7 -        [field_edit interpretKeyEvents:[NSArray arrayWithObject:event]];
     1.8 +/*        [field_edit interpretKeyEvents:[NSArray arrayWithObject:event]]; */
     1.9          chars = [ event characters ];
    1.10          numChars = [ chars length ];
    1.11 +/*
    1.12          if (numChars > 0)
    1.13 -            [field_edit setString:@""];
    1.14 +            [field_edit setString:@""];*/
    1.15      } else {
    1.16          numChars = 0;
    1.17      }