Skip to content

Commit 060653d

Browse files
committed
Fix
1 parent 10155e7 commit 060653d

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/conic_form.jl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,8 @@ end
4242
_coef_type(::MOI.Utilities.AbstractModel{T}) where {T} = T
4343

4444
function objective_vector(model::MOI.ModelLike; T = _coef_type(model))
45-
obj = MOI.get(src, MOI.ObjectiveFunction{MOI.ScalarAffineFunction{T}}())
46-
dest.objective_constant = MOI.constant(obj)
47-
c = zeros(A.n)
45+
obj = MOI.get(model, MOI.ObjectiveFunction{MOI.ScalarAffineFunction{T}}())
46+
c = zeros(MOI.get(model, MOI.NumberOfVariables()))
4847
for term in obj.terms
4948
c[term.variable.value] += term.coefficient
5049
end

0 commit comments

Comments
 (0)