Selaa lähdekoodia

Bug behoben, der zum Absturz geführt hat

Kolja Strohm 6 vuotta sitten
vanhempi
commit
b7f7ebd3f2
1 muutettua tiedostoa jossa 7 lisäystä ja 1 poistoa
  1. 7 1
      AppServer/AppServer.cpp

+ 7 - 1
AppServer/AppServer.cpp

@@ -427,8 +427,14 @@ void AppSKlient::thread()
             case 0: // Schlüssel Anfrage
                 if( 1 )
                 {
-                    klient->sendeEncrypted( "\1", 1 );
                     Text *s = appS->zDB()->getKey();
+                    if( s )
+                        klient->sendeEncrypted( "\1", 1 );
+                    else
+                    {
+                        errorZuKlient( "Fehler beim Aufbauen der verschlüsselten Verbindung zum Server." );
+                        break;
+                    }
                     char l = (char)s->getLength();
                     klient->sendeEncrypted( &l, 1 );
                     klient->sendeEncrypted( s->getText(), l );