mirror of
				https://github.com/kepler155c/opus
				synced 2025-10-31 15:43:00 +00:00 
			
		
		
		
	parameter validation
This commit is contained in:
		| @@ -1219,7 +1219,7 @@ function UI.Page:focusNext() | |||||||
| end | end | ||||||
|  |  | ||||||
| function UI.Page:setFocus(child) | function UI.Page:setFocus(child) | ||||||
| 	if not child.focus then | 	if not child or not child.focus then | ||||||
| 		return | 		return | ||||||
| 	end | 	end | ||||||
|  |  | ||||||
|   | |||||||
| @@ -489,6 +489,7 @@ function Util.insertString(str, istr, pos) | |||||||
| end | end | ||||||
|  |  | ||||||
| function Util.split(str, pattern) | function Util.split(str, pattern) | ||||||
|  | 	if not str then error('Util:split: invalid parameters', 2) end | ||||||
| 	pattern = pattern or "(.-)\n" | 	pattern = pattern or "(.-)\n" | ||||||
| 	local t = {} | 	local t = {} | ||||||
| 	local function helper(line) table.insert(t, line) return "" end | 	local function helper(line) table.insert(t, line) return "" end | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 kepler155c@gmail.com
					kepler155c@gmail.com