Hi
This has really no explanaition to me.
Why if at line 331
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
It crashes on the next line (If checks at 331)
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
I have checked that both are the same type, that both values are not null but i cannot see why this would happen. I also tried to change the type to Long with no success either. Why the logs output false, but the IF crashes
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
			
			This has really no explanaition to me.
Why if at line 331
			
				B4X:
			
		
		
		Log(bookingTypeMap.Get("showOnBooking").As(Int)=1)It crashes on the next line (If checks at 331)
			
				B4X:
			
		
		
		If bookingTypeMap.Get("showOnBooking").As(Int)=1 Then
			
				B4X:
			
		
		
		    Dim idBookingType As Int=bookingType.Tag.As(Int)
    For i=0 To Main.mapData.Get("bookingTypes").As(List).Size-1
        Dim bookingTypeMap As Map=Main.mapData.Get("bookingTypes").As(List).Get(i).As(Map)
        Log(bookingTypeMap)
        Log(GetType(bookingTypeMap.Get("idBookingType")))
        Log(bookingTypeMap.Get("showOnBooking").As(Int)=1)
        If bookingTypeMap.Get("showOnBooking").As(Int)=1 Then '<---LINE 332
            Try
                If idBookingType=bookingTypeMap.Get("idBookingType").As(Int) Then
                    sb.Append(". Reserva tipo " & bookingTypeMap.Get("bookingType"))
                    If listData.GetPanel(instructorIndex).Height>1 Then
                        sb.Append(", instructor " & instructor.Title)
                    End If
                End If
            Catch
                Log(LastException)
            End Try
        End If
    Next
			
				B4X:
			
		
		
		(MyMap) {idBookingType=1134, bookingType=Normal, bookingTypeCode=NORMAL, showOnBooking=1, showOnFlightLog=1, hasCharge=1, bookingTypeClass=blue, bookingTypeColor=0,64,255}
java.lang.Integer
true
(MyMap) {idBookingType=1135, bookingType=Instrucción, bookingTypeCode=INSTRUCTION, showOnBooking=1, showOnFlightLog=1, hasCharge=1, bookingTypeClass=green, bookingTypeColor=0,140,35}
java.lang.Integer
true
(MyMap) {idBookingType=1133, bookingType=Chequeo, bookingTypeCode=CHECK, showOnBooking=1, showOnFlightLog=1, hasCharge=1, bookingTypeClass=orange, bookingTypeColor=255,127,0}
java.lang.Integer
true
(MyMap) {idBookingType=2799, bookingType=Examen DGAC, bookingTypeCode=DGAC, showOnBooking=1, showOnFlightLog=1, hasCharge=1, bookingTypeClass=brown, bookingTypeColor=213,144,120}
java.lang.Integer
true
(MyMap) {idBookingType=4720, bookingType=PAX Club, bookingTypeCode=PAXC, showOnBooking=0, showOnFlightLog=1, hasCharge=0, bookingTypeClass=teal, bookingTypeColor=51,153,153}
java.lang.Integer
false
(MyMap) {idBookingType=133037, bookingType=Demo, bookingTypeCode=DEMO, showOnBooking=0, showOnFlightLog=1, hasCharge=0, bookingTypeClass=purple, bookingTypeColor=204,0,204}
java.lang.Integer
false
(MyMap) {idBookingType=145294, bookingType=Mantenimiento, bookingTypeCode=MANTTO, showOnBooking=0, showOnFlightLog=1, hasCharge=0, bookingTypeClass=dark, bookingTypeColor=0,0,0}
java.lang.Integer
false
(MyMap) {idBookingType=1895908, bookingType=No Disponible, bookingTypeCode=NA, showOnBooking=0, showOnFlightLog=1, hasCharge=0, bookingTypeClass=cyan, bookingTypeColor=0,0,0,0}
java.lang.Integer
false
Error occurred on line: 332 (userBookingsAdd)
java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.Object.equals(java.lang.Object)' on a null object reference
    at anywheresoftware.b4a.BA.switchObjectToInt(BA.java:792)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732)
    at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:348)
    at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:157)
    at anywheresoftware.b4a.keywords.Common.CallSub4(Common.java:1114)
    at anywheresoftware.b4a.keywords.Common.CallSubNew(Common.java:1061)
    at cl.planeadores.android.clsbutton._btn2_click(clsbutton.java:372)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732)
    at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:351)
    at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:157)
    at anywheresoftware.b4a.BA.raiseEvent(BA.java:201)
    at anywheresoftware.b4a.objects.ViewWrapper$1.onClick(ViewWrapper.java:80)
    at android.view.View.performClick(View.java:6597)
    at android.view.View.performClickInternal(View.java:6574)
    at android.view.View.access$3100(View.java:778)
    at android.view.View$PerformClick.run(View.java:25885)
    at android.os.Handler.handleCallback(Handler.java:873)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:193)
    at android.app.ActivityThread.main(ActivityThread.java:6669)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) 
				 
 
		 
 
		 
 
		 
						
					 
 
		 
 
		 
 
		 
 
		