Fix double free, null texture drop
Merge remote-tracking branch 'upstream/master' into math
tidy