From d9dcd9e8549d86c31b98f109fe2aed45b64476dd Mon Sep 17 00:00:00 2001
From: Alex Shvartzkop <dudesuchamazing@gmail.com>
Date: Wed, 15 Jan 2025 22:04:57 +0500
Subject: [PATCH] EasyEDA Pro schematic: import text with null angle.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19640
---
 eeschema/sch_io/easyedapro/sch_easyedapro_parser.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/eeschema/sch_io/easyedapro/sch_easyedapro_parser.cpp b/eeschema/sch_io/easyedapro/sch_easyedapro_parser.cpp
index 143df19962..ce4a952ded 100644
--- a/eeschema/sch_io/easyedapro/sch_easyedapro_parser.cpp
+++ b/eeschema/sch_io/easyedapro/sch_easyedapro_parser.cpp
@@ -533,7 +533,7 @@ SCH_EASYEDAPRO_PARSER::ParseSymbol( const std::vector<nlohmann::json>&  aLines,
         else if( type == wxS( "TEXT" ) )
         {
             VECTOR2D pos( line.at( 2 ), line.at( 3 ) );
-            double   angle = line.at( 4 );
+            double   angle = line.at( 4 ).is_number() ? line.at( 4 ).get<double>() : 0.0;
             wxString textStr = line.at( 5 );
             wxString fontStyleStr = line.at( 6 );
 
@@ -938,7 +938,7 @@ void SCH_EASYEDAPRO_PARSER::ParseSchematic( SCHEMATIC* aSchematic, SCH_SHEET* aR
         else if( type == wxS( "TEXT" ) )
         {
             VECTOR2D pos( line.at( 2 ), line.at( 3 ) );
-            double   angle = line.at( 4 );
+            double   angle = line.at( 4 ).is_number() ? line.at( 4 ).get<double>() : 0.0;
             wxString textStr = line.at( 5 );
             wxString fontStyleStr = line.at( 6 );