Do not crash if problem to access MC clipboard
This commit is contained in:
parent
9dac8c18b8
commit
c0439363f6
@ -12,6 +12,8 @@ ______________________________________________________________________
|
|||||||
Notes for GoldED+ 1.1.5, /snapshot/
|
Notes for GoldED+ 1.1.5, /snapshot/
|
||||||
______________________________________________________________________
|
______________________________________________________________________
|
||||||
|
|
||||||
|
- Do not crash if problem to access MC clipboard (Linux specific).
|
||||||
|
|
||||||
- To fix problem with related pathname in NODEPATH the Goldnode will
|
- To fix problem with related pathname in NODEPATH the Goldnode will
|
||||||
write only filename in .gxl file. Most users should not notice this
|
write only filename in .gxl file. Most users should not notice this
|
||||||
change at all.
|
change at all.
|
||||||
|
@ -105,6 +105,8 @@ char* g_get_clip_text(void) {
|
|||||||
std::string clipfile = CLIPFILE;
|
std::string clipfile = CLIPFILE;
|
||||||
strschg_environ(clipfile);
|
strschg_environ(clipfile);
|
||||||
size_t size = GetFilesize(clipfile.c_str());
|
size_t size = GetFilesize(clipfile.c_str());
|
||||||
|
|
||||||
|
if(size != -1) {
|
||||||
char *text = (char *)throw_malloc(size+1);
|
char *text = (char *)throw_malloc(size+1);
|
||||||
*text = NUL;
|
*text = NUL;
|
||||||
|
|
||||||
@ -114,6 +116,7 @@ char* g_get_clip_text(void) {
|
|||||||
text[size] = NUL;
|
text[size] = NUL;
|
||||||
fclose(f);
|
fclose(f);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user