Skip to content

Commit e249a2d

Browse files
committed
fix crash when clipboard_pull_text returns null
1 parent d6cc9e9 commit e249a2d

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

build/readme.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -673,9 +673,6 @@ Immediate TODO: '>' means currently being worked on/added next
673673
>add all missing lua functions
674674
move menu_count to Menus.h (needs tooltips done first)
675675
Finish brushes (change all instances of rx and ry to the brush things)
676-
redo GolTool as MultipleTool, special tools that can draw multiple forms of an element (maybe)
677-
Redo wall ID's and walls entirely
678-
Redo gmenu
679676
Redo fav menu ...
680677
Redo (Add) tooltips
681678
Add in all missing lua functions except for interface api

src/interface.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -712,7 +712,9 @@ void ui_edit_process(int mx, int my, int mb, int mbq, ui_edit *ed)
712712
}
713713
else if(sdl_mod & (KMOD_CTRL) && sdl_key=='v')//paste
714714
{
715-
char *paste = clipboard_pull_text();
715+
char* paste = clipboard_pull_text();
716+
if (!paste)
717+
return;
716718
int pl = strlen(paste);
717719
if ((textwidth(str)+textwidth(paste) > ed->w-14 && !ed->multiline) || (pl+strlen(ed->str)>ed->limit) || (float)(((textwidth(str)+textwidth(paste))/(ed->w-14)*12) > ed->h && ed->multiline && ed->limit != 1023))
718720
break;

0 commit comments

Comments
 (0)