We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 29aa040 commit 90bcbdfCopy full SHA for 90bcbdf
1 file changed
IOS/SDK/LuaViewSDK/Classes/lvsdk/LVTimer.m
@@ -113,14 +113,15 @@ static int setCallback (lua_State *L) {
113
114
static int start (lua_State *L) {
115
LVUserDataInfo * user = (LVUserDataInfo *)lua_touserdata(L, 1);
116
- LVTimer* timer = (__bridge LVTimer *)(user->object);
117
- if( lua_gettop(L)>=2 ) {
118
- timer.interval = lua_tonumber(L, 2);
119
- }
120
- if( lua_gettop(L)>=3 ) {
121
- timer.repeat = lua_toboolean(L, 3);
122
123
- if( user ){
+
+ if ( user ) {
+ LVTimer* timer = (__bridge LVTimer *)(user->object);
+ if( lua_gettop(L)>=2 ) {
+ timer.interval = lua_tonumber(L, 2);
+ }
+ if( lua_gettop(L)>=3 ) {
+ timer.repeat = lua_toboolean(L, 3);
124
125
if( timer ){
126
[timer startTimer];
127
lua_pushvalue(L,1);
0 commit comments