https://bugs.documentfoundation.org/show_bug.cgi?id=160578

            Bug ID: 160578
           Summary: BASIC Runtime error. Object variable not set. Happens
                    when the argument of sub procedure is not an object
           Product: LibreOffice
           Version: 7.6.5.2 release
          Hardware: All
                OS: macOS (All)
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: BASIC
          Assignee: [email protected]
          Reporter: [email protected]

Description:
An unexpected runtime error when the argument of a sub procedure is a Variant
that can be an object or not. 

Steps to Reproduce:
Sub Main
        Test("One")
End Sub

Sub Test(pvArg As Variant)
        On Local Error GoTo Erreur
        If IsObject(pvArg) then
                Print pvArg.SupportsService("com.sun.star.table.Cell")
        Else
                Print "pvArg is not an object"
        EndIf
        Exit Sub
Erreur: Print "Error"
End Sub

Actual Results:
Raises a runtime error on the first line of the sub procedure.
The 'On Local Error instruction' is ignored

Expected Results:
No runtime error. The argument should be tested by IsObject.


Reproducible: Always


User Profile Reset: No

Additional Info:
[Information automatically included from LibreOffice]
Locale: en-US
Module: BasicIDE
[Information guessed from browser]
OS: Mac OS X (All)
OS is 64bit: no

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to