diff options
| author | Neil Hodgson <nyamatongwe@gmail.com> | 2015-06-19 10:11:44 +1000 |
|---|---|---|
| committer | Neil Hodgson <nyamatongwe@gmail.com> | 2015-06-19 10:11:44 +1000 |
| commit | f85a86f72d0f51ba13ecb9445468dbf2a8a89edd (patch) | |
| tree | 45c8b921a3458d4eef9961161ffcece4aba5c29d /cocoa/PlatCocoa.mm | |
| parent | 87c616aca17c4f5b0fdd373641f9ec95c4bbe04b (diff) | |
| download | scintilla-mirror-f85a86f72d0f51ba13ecb9445468dbf2a8a89edd.tar.gz | |
Fix crash in drag and drop.
Diffstat (limited to 'cocoa/PlatCocoa.mm')
| -rw-r--r-- | cocoa/PlatCocoa.mm | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/cocoa/PlatCocoa.mm b/cocoa/PlatCocoa.mm index fd3e97619..8a0f942f4 100644 --- a/cocoa/PlatCocoa.mm +++ b/cocoa/PlatCocoa.mm @@ -270,9 +270,17 @@ void SurfaceImpl::InitPixMap(int width, int height, Surface* surface_, WindowID CGContextFillRect( gc, CGRectMake( 0, 0, width, height ) ); } - SurfaceImpl *psurfOther = static_cast<SurfaceImpl *>(surface_); - unicodeMode = psurfOther->unicodeMode; - codePage = psurfOther->codePage; + if (surface_) + { + SurfaceImpl *psurfOther = static_cast<SurfaceImpl *>(surface_); + unicodeMode = psurfOther->unicodeMode; + codePage = psurfOther->codePage; + } + else + { + unicodeMode = true; + codePage = SC_CP_UTF8; + } } //-------------------------------------------------------------------------------------------------- |
