The dissolution of the Austro-Hungarian Empire in 1918 was a cataclysm with many fathers. Slavic nationalism was a critical factor, but not the sole cause. It operated within a perfect storm of structural weaknesses.
Slavs (Czechs, Slovaks, Poles, Ukrainians, Slovenes, Croats, Serbs, Bosniaks) constituted the empire's largest demographic bloc (~45%). Denied political autonomy commensurate with their numbers—dominated by German Austrians and Magyars—they developed powerful nationalist movements. The 1914 assassination of Archduke Franz Ferdinand by Bosnian Serb nationalists was the spark. During WWI, Slavic units deserted en masse; the 1918 declarations of independence by Czechoslovakia, Yugoslavia, and Poland were the death blows.
Slavic nationalism provided the ideological engine for the new successor states, but the empire's structural rigidity and wartime collapse provided the opportunity. Without the war, the empire might have muddled through; without Slavic nationalism, the post-war map would have looked vastly different.