]> git.mxchange.org Git - simgear.git/commitdiff
Don't crash when "avionics == NULL".
authorThorstenB <brehmt@gmail.com>
Thu, 22 Mar 2012 22:54:01 +0000 (23:54 +0100)
committerThorstenB <brehmt@gmail.com>
Thu, 22 Mar 2012 22:54:01 +0000 (23:54 +0100)
simgear/sound/xmlsound.cxx

index f680f47a185a816362021f412212d73674919f30..2b914d596258c00f9f13ab48d013ada878f840b4 100644 (file)
@@ -269,7 +269,7 @@ SGXmlSound::init(SGPropertyNode *root, SGPropertyNode *node,
    //
    // Initialize the sample
    //
-   if (is_avionics) {
+   if ((is_avionics)&&(avionics)) {
       _sgrp = avionics;
    } else {
       _sgrp = sgrp;