Lua: GetBrushBackupPixel now works (Had forgotten to make initial copy :-/ )
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1289 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
parent
bfbefeff82
commit
fa15037a42
10
factory.c
10
factory.c
@ -375,11 +375,15 @@ void Button_Brush_Factory(void)
|
||||
Brush_backup_width = Brush_width;
|
||||
Brush_backup_height = Brush_height;
|
||||
|
||||
if (Brush == NULL)
|
||||
if (Brush_backup == NULL)
|
||||
{
|
||||
Verbose_error_message("Out of memory!");
|
||||
}
|
||||
else if (luaL_loadfile(L,scriptdir) != 0)
|
||||
else
|
||||
{
|
||||
memcpy(Brush_backup, Brush, ((long)Brush_height)*Brush_width);
|
||||
|
||||
if (luaL_loadfile(L,scriptdir) != 0)
|
||||
{
|
||||
message = lua_tostring(L, 1);
|
||||
if(message)
|
||||
@ -395,7 +399,7 @@ void Button_Brush_Factory(void)
|
||||
else
|
||||
Warning_message("Unknown error running script!");
|
||||
}
|
||||
|
||||
}
|
||||
// Cleanup
|
||||
free(Brush_backup);
|
||||
Brush_backup=NULL;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user